fix old and add new http\Client\Curl\Versions constants
[m6w6/ext-http] / tests / messagebody003.phpt
1 --TEST--
2 message body append error
3 --SKIPIF--
4 <?php
5 include "skipif.inc";
6 ?>
7 --INI--
8 zend.exception_ignore_args=off
9 --FILE--
10 <?php
11 echo "Test\n";
12
13 $file = new http\Message\Body(fopen(__FILE__, "r"));
14 try {
15 @$file->append("nope");
16 } catch (Exception $e) {
17 echo $e, "\n";
18 }
19
20 ?>
21 DONE
22 --EXPECTF--
23 Test
24 http\Exception\RuntimeException: http\Message\Body::append(): Failed to append 4 bytes to body; wrote 0 in %s:%d
25 Stack trace:
26 #0 %s(%d): http\Message\Body->append('nope')
27 #1 {main}
28 DONE