X-Git-Url: https://git.m6w6.name/?p=m6w6%2Fext-http;a=blobdiff_plain;f=tests%2Finfo002.phpt;fp=tests%2Finfo002.phpt;h=41bd7b49adb0c23537a4589c1f93d6c727a58fae;hp=0000000000000000000000000000000000000000;hb=046973e332c1475f9bf7717af9d33a75283deb37;hpb=7b3c686de9ef70f2124136b5a1b8dffa7602a4d7 diff --git a/tests/info002.phpt b/tests/info002.phpt new file mode 100644 index 0000000..41bd7b4 --- /dev/null +++ b/tests/info002.phpt @@ -0,0 +1,49 @@ +--TEST-- +invalid HTTP info +--SKIPIF-- + +--FILE-- + +===DONE=== +--EXPECTF-- +Test +exception 'http\Exception\BadMessageException' with message 'Could not parse message: HTTP/1.1 99 Apples in my ' 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 +Stack trace: +#0 %sinfo002.php(%d): http\Message->__construct('CONNECT HTTP/1....') +#1 %sinfo002.php(%d): {closure}() +#2 %sinfo002.php(%d): trap(Object(Closure)) +#3 {main} +HTTP/1.1 200 +CONNECT www.example.org:80 HTTP/1.1 +===DONE===