X-Git-Url: https://git.m6w6.name/?a=blobdiff_plain;f=tests%2FHttpMessage_001.phpt;h=1ceda68e24748ef9684d2ccaa2bf1db88cb98e3d;hb=dec77e7f26b565cbd399c6a73357e3abbcf1e423;hp=6c08b8aaa64503770c3c40aec5f3f23bbb3f2072;hpb=4a1c5914eccd82e0936f35f0804a9e35ed632f83;p=m6w6%2Fext-http diff --git a/tests/HttpMessage_001.phpt b/tests/HttpMessage_001.phpt index 6c08b8a..1ceda68 100644 --- a/tests/HttpMessage_001.phpt +++ b/tests/HttpMessage_001.phpt @@ -1,17 +1,18 @@ --TEST-- HttpMessage --SKIPIF-- - --FILE-- 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(1) "X" +string(135) "HTTP/1.1 301 Location: /anywhere HTTP/1.1 302 -Location: /somwhere +Location: /somewhere HTTP/1.1 206 Content-Range: bytes=2-3 Content-Length: 1 X " -string(134) "HTTP/1.1 301 -Location: /anywhere -HTTP/1.1 302 -Location: /somwhere -HTTP/1.1 206 +string(64) "HTTP/1.1 206 Content-Range: bytes=2-3 Content-Length: 1 X " +string(36) "HTTP/1.1 302 +Location: /somewhere +" +string(35) "HTTP/1.1 301 +Location: /anywhere +" +Done