projects
/
m6w6
/
ext-http
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
|
github
raw
|
inline
| side by side
- ditch http_split_response()
[m6w6/ext-http]
/
tests
/
HttpRequest_002.phpt
diff --git
a/tests/HttpRequest_002.phpt
b/tests/HttpRequest_002.phpt
index 56006a8af8e3e2118095b04d0040811f04d5cbc9..349f1faf38c752e4970fda9c31e7748dfa4493c6 100644
(file)
--- a/
tests/HttpRequest_002.phpt
+++ b/
tests/HttpRequest_002.phpt
@@
-3,12
+3,15
@@
HttpRequest GET/POST
--SKIPIF--
<?php
include 'skip.inc';
--SKIPIF--
<?php
include 'skip.inc';
-(5 > (int) PHP_VERSION) and die('skip PHP5 is required for Http classes');
+checkver(5);
+checkcls('HttpRequest');
+checkurl('www.google.com');
?>
--FILE--
<?php
?>
--FILE--
<?php
+echo "-TEST\n";
$r = new HttpRequest('http://www.google.com', HTTP_GET);
$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));
print_r($r->getResponseInfo());
$r->setMethod(HTTP_POST);
$r->addPostFields(array('q'=>'foobar','start'=>10));
@@
-18,10
+21,7
@@
var_dump($r->getResponseMessage()->getResponseCode());
var_dump(false != strstr($r->getResponseBody(), "Not Implemented"));
?>
--EXPECTF--
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/
Array
(
[effective_url] => http://www.google.com/
@@
-46,9
+46,9
@@
Array
[content_length_upload] => %d
[content_type] => %s
[httpauth_avail] => %d
[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)
)
int(501)
int(501)
bool(true)
+