From: Michael Wallner Date: Tue, 3 May 2005 07:28:12 +0000 (+0000) Subject: - simple message test X-Git-Tag: RELEASE_0_8_0~42 X-Git-Url: https://git.m6w6.name/?a=commitdiff_plain;h=3739156e5901eb81df2bd844abf301e08cd52405;p=m6w6%2Fext-http - simple message test --- diff --git a/tests/HttpMessage_001.phpt b/tests/HttpMessage_001.phpt new file mode 100644 index 0000000..d7e7ba9 --- /dev/null +++ b/tests/HttpMessage_001.phpt @@ -0,0 +1,52 @@ +--TEST-- +HttpMessage simple redirects +--SKIPIF-- + (int) PHP_VERSION) and die('skip PHP5 is required for Http classes'); +?> +--FILE-- +getBody()); +var_dump($m->toString()); +var_dump(HttpMessage::fromString($m->toString())->toString()); +?> +--EXPECTF-- +Content-type: text/html +X-Powered-By: PHP/%s + +string(1) "X" +string(134) "HTTP/1.1 301 +Location: /anywhere +HTTP/1.1 302 +Location: /somwhere +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 +Content-Range: bytes=2-3 +Content-Length: 1 + +X +"