From 3739156e5901eb81df2bd844abf301e08cd52405 Mon Sep 17 00:00:00 2001 From: Michael Wallner Date: Tue, 3 May 2005 07:28:12 +0000 Subject: [PATCH] - simple message test --- tests/HttpMessage_001.phpt | 52 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 52 insertions(+) create mode 100644 tests/HttpMessage_001.phpt 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 +" -- 2.30.2