-fix installation through pear
[m6w6/ext-http] / tests / HttpRequest_002.phpt
index 56006a8af8e3e2118095b04d0040811f04d5cbc9..9c9c49ac80004e12629040d9f8c6e94a5793115c 100644 (file)
@@ -3,10 +3,12 @@ HttpRequest GET/POST
 --SKIPIF--
 <?php
 include 'skip.inc';
-(5 > (int) PHP_VERSION) and die('skip PHP5 is required for Http classes');
+checkver(5);
+checkurl('www.google.com');
 ?>
 --FILE--
 <?php
+echo "-TEST\n";
 $r = new HttpRequest('http://www.google.com', HTTP_GET);
 var_dump($r->send());
 print_r($r->getResponseInfo());
@@ -18,9 +20,7 @@ var_dump($r->getResponseMessage()->getResponseCode());
 var_dump(false != strstr($r->getResponseBody(), "Not Implemented"));
 ?>
 --EXPECTF--
-Content-type: text/html
-X-Powered-By: PHP/%s
-
+%sTEST
 bool(true)
 Array
 (
@@ -52,3 +52,4 @@ Array
 int(501)
 int(501)
 bool(true)
+