- bloody workaround for internal class' static properties
[m6w6/ext-http] / tests / HttpRequest_002.phpt
index 3e95b4570029bb088a01d56b172e162d48d5e77e..349f1faf38c752e4970fda9c31e7748dfa4493c6 100644 (file)
@@ -4,12 +4,14 @@ HttpRequest GET/POST
 <?php
 include 'skip.inc';
 checkver(5);
+checkcls('HttpRequest');
 checkurl('www.google.com');
 ?>
 --FILE--
 <?php
+echo "-TEST\n";
 $r = new HttpRequest('http://www.google.com', HTTP_GET);
-var_dump($r->send());
+$r->send();
 print_r($r->getResponseInfo());
 $r->setMethod(HTTP_POST);
 $r->addPostFields(array('q'=>'foobar','start'=>10));
@@ -19,10 +21,7 @@ var_dump($r->getResponseMessage()->getResponseCode());
 var_dump(false != strstr($r->getResponseBody(), "Not Implemented"));
 ?>
 --EXPECTF--
-Content-type: text/html
-X-Powered-By: PHP/%s
-
-bool(true)
+%sTEST
 Array
 (
     [effective_url] => http://www.google.com/
@@ -47,8 +46,7 @@ Array
     [content_length_upload] => %d
     [content_type] => %s
     [httpauth_avail] => %d
-    [proxyauth_avail] => %d
-    [num_connects] => %d
+    [proxyauth_avail] => %s
 )
 int(501)
 int(501)