X-Git-Url: https://git.m6w6.name/?a=blobdiff_plain;f=tests%2FHttpMessage_001.phpt;h=c2fe79a33e6cb64c0cdbec2daeabb26d91ddf955;hb=a93c1059c61026dab25278d0839c44745fc117b6;hp=6c08b8aaa64503770c3c40aec5f3f23bbb3f2072;hpb=4a1c5914eccd82e0936f35f0804a9e35ed632f83;p=m6w6%2Fext-http diff --git a/tests/HttpMessage_001.phpt b/tests/HttpMessage_001.phpt index 6c08b8a..c2fe79a 100644 --- a/tests/HttpMessage_001.phpt +++ b/tests/HttpMessage_001.phpt @@ -1,18 +1,19 @@ --TEST-- HttpMessage --SKIPIF-- - --FILE-- getResponseStatus()); + +$x = $m->getParentMessage(); +$x = $m->getParentMessage(); +$x = $m->getParentMessage(); + var_dump($m->getBody()); -var_dump($m->toString()); -var_dump(HttpMessage::fromString($m->toString())->toString()); +var_dump(HttpMessage::fromString($m->toString(true))->toString(true)); +do { + var_dump($m->toString()); +} while ($m = $m->getParentMessage()); + +echo "Done\n"; ?> --EXPECTF-- -%sstring(1) "X" -string(134) "HTTP/1.1 301 +%sTEST +string(15) "Partial content" +string(1) "X" +string(190) "HTTP/1.1 301 Location: /anywhere HTTP/1.1 302 -Location: /somwhere -HTTP/1.1 206 +Location: /somewhere +HTTP/1.1 206 Partial content Content-Range: bytes=2-3 +X-Original-Transfer-Encoding: chunked Content-Length: 1 X " -string(134) "HTTP/1.1 301 -Location: /anywhere -HTTP/1.1 302 -Location: /somwhere -HTTP/1.1 206 +string(119) "HTTP/1.1 206 Partial content Content-Range: bytes=2-3 +X-Original-Transfer-Encoding: chunked Content-Length: 1 X " +string(36) "HTTP/1.1 302 +Location: /somewhere +" +string(35) "HTTP/1.1 301 +Location: /anywhere +" +Done