X-Git-Url: https://git.m6w6.name/?a=blobdiff_plain;f=tests%2FHttpMessage_001.phpt;h=6791bc336173fbe926742eb48c5714356eec315d;hb=76ef3c1710bd22c560f9459f00452050d72f44db;hp=6d8171dd639907624c89a61ab74a8613e5cb34ae;hpb=6deee2e3d2d6282dd76e3725fe2de6c7833bd57f;p=m6w6%2Fext-http diff --git a/tests/HttpMessage_001.phpt b/tests/HttpMessage_001.phpt index 6d8171d..6791bc3 100644 --- a/tests/HttpMessage_001.phpt +++ b/tests/HttpMessage_001.phpt @@ -3,7 +3,7 @@ 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-- %sTEST string(1) "X" -string(134) "HTTP/1.1 301 +string(174) "HTTP/1.1 301 Location: /anywhere HTTP/1.1 302 -Location: /somwhere +Location: /somewhere HTTP/1.1 206 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(103) "HTTP/1.1 206 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