fix #98 #99 #100 #101 #102 #103
[m6w6/ext-http] / tests / info002.phpt
index 41bd7b49adb0c23537a4589c1f93d6c727a58fae..4d0344030115ba691bad92ea2e860f03aaac1185 100644 (file)
@@ -4,12 +4,14 @@ invalid HTTP info
 <?php 
 include "skipif.inc";
 ?>
+--INI--
+zend.exception_ignore_args=off
 --FILE--
 <?php 
 
 echo "Test\n";
 
-function trap(callable $cb) {
+function trap($cb) {
        try {
                $cb();
        } catch (Exception $e) { 
@@ -32,13 +34,13 @@ echo new http\Message("CONNECT www.example.org:80 HTTP/1.1");
 ===DONE===
 --EXPECTF--
 Test
-exception 'http\Exception\BadMessageException' with message 'Could not parse message: HTTP/1.1 99 Apples in my ' in %sinfo002.php:%d
+http\Exception\BadMessageException: http\Message::__construct(): Failed to parse headers: unexpected character '\057' at pos 4 of 'HTTP/1.1 99 Apples in my Basket' in %sinfo002.php:%d
 Stack trace:
 #0 %sinfo002.php(%d): http\Message->__construct('HTTP/1.1 99 App...')
 #1 %sinfo002.php(%d): {closure}()
 #2 %sinfo002.php(%d): trap(Object(Closure))
 #3 {main}
-exception 'http\Exception\BadMessageException' with message 'Could not parse message: CONNECT HTTP/1.1' in %sinfo002.php:%d
+http\Exception\BadMessageException: http\Message::__construct(): Failed to parse headers: unexpected character '\040' at pos 7 of 'CONNECT HTTP/1.1' in %sinfo002.php:%d
 Stack trace:
 #0 %sinfo002.php(%d): http\Message->__construct('CONNECT HTTP/1....')
 #1 %sinfo002.php(%d): {closure}()