X-Git-Url: https://git.m6w6.name/?a=blobdiff_plain;f=tests%2FHttpRequest_002.phpt;h=c0766b0f376ed92fd9b877d0c5ac7c9924015c96;hb=40806abd47a65a1fccc000507fd2ff95954a75a5;hp=669197eb23cd19cca8efcdfc1c0110156f870660;hpb=147fb6c4b51fc83e0d0393ca6999e36a36908157;p=m6w6%2Fext-http diff --git a/tests/HttpRequest_002.phpt b/tests/HttpRequest_002.phpt index 669197e..c0766b0 100644 --- a/tests/HttpRequest_002.phpt +++ b/tests/HttpRequest_002.phpt @@ -3,10 +3,12 @@ HttpRequest GET/POST --SKIPIF-- (int) PHP_VERSION) and die('skip PHP5 is required for Http classes'); +checkver(5); +checkurl('www.google.com'); ?> --FILE-- send()); print_r($r->getResponseInfo()); @@ -14,12 +16,11 @@ $r->setMethod(HTTP_POST); $r->addPostFields(array('q'=>'foobar','start'=>10)); $r->send(); var_dump($r->getResponseCode()); +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 ( @@ -45,8 +46,9 @@ Array [content_length_upload] => %d [content_type] => %s [httpauth_avail] => %d - [proxyauth_avail] => %d - [num_connects] => %d + [proxyauth_avail] => %s ) int(501) +int(501) bool(true) +