X-Git-Url: https://git.m6w6.name/?p=m6w6%2Fext-http;a=blobdiff_plain;f=tests%2FHttpMessage_001.phpt;h=e787523b2f20a57ebbb15906ee6db1502771f225;hp=6d8171dd639907624c89a61ab74a8613e5cb34ae;hb=93e726eb9c892c26bc5ddb5417d0ac67ef691147;hpb=6deee2e3d2d6282dd76e3725fe2de6c7833bd57f diff --git a/tests/HttpMessage_001.phpt b/tests/HttpMessage_001.phpt index 6d8171d..e787523 100644 --- a/tests/HttpMessage_001.phpt +++ b/tests/HttpMessage_001.phpt @@ -3,7 +3,7 @@ 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)); +try { + do { + var_dump($m->toString()); + } while ($m = $m->getParentMessage()); +} catch (HttpException $ex) { +} + +echo "Done\n"; ?> --EXPECTF-- %sTEST +string(15) "Partial content" string(1) "X" -string(134) "HTTP/1.1 301 +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