- API juggling
[m6w6/ext-http] / tests / HttpMessage_001.phpt
index d7e7ba9dd347f4f8e01a2fd5f3ef29544045ebc7..6d8171dd639907624c89a61ab74a8613e5cb34ae 100644 (file)
@@ -1,12 +1,13 @@
 --TEST--
-HttpMessage simple redirects
+HttpMessage
 --SKIPIF--
-<?php 
+<?php
 include 'skip.inc';
-(5 > (int) PHP_VERSION) and die('skip PHP5 is required for Http classes');
+checkver(5);
 ?>
 --FILE--
 <?php
+echo "-TEST\n";
 $m = new HttpMessage(
        "HTTP/1.1 301\r\n".
        "Location: /anywhere\r\n".
@@ -26,9 +27,7 @@ var_dump($m->toString());
 var_dump(HttpMessage::fromString($m->toString())->toString());
 ?>
 --EXPECTF--
-Content-type: text/html
-X-Powered-By: PHP/%s
-
+%sTEST
 string(1) "X"
 string(134) "HTTP/1.1 301
 Location: /anywhere
@@ -50,3 +49,4 @@ Content-Length: 1
 
 X
 "
+