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 redundant http_split_response
[m6w6/ext-http]
/
tests
/
HttpRequest_002.phpt
diff --git
a/tests/HttpRequest_002.phpt
b/tests/HttpRequest_002.phpt
index 52941506cb8ba1cdc5b43690adc1a9833a6787da..669197eb23cd19cca8efcdfc1c0110156f870660 100644
(file)
--- a/
tests/HttpRequest_002.phpt
+++ b/
tests/HttpRequest_002.phpt
@@
-1,7
+1,7
@@
--TEST--
--TEST--
-HttpRequest GET
+HttpRequest GET
/POST
--SKIPIF--
--SKIPIF--
-<?php
+<?php
include 'skip.inc';
(5 > (int) PHP_VERSION) and die('skip PHP5 is required for Http classes');
?>
include 'skip.inc';
(5 > (int) PHP_VERSION) and die('skip PHP5 is required for Http classes');
?>
@@
-10,6
+10,11
@@
include 'skip.inc';
$r = new HttpRequest('http://www.google.com', HTTP_GET);
var_dump($r->send());
print_r($r->getResponseInfo());
$r = new HttpRequest('http://www.google.com', HTTP_GET);
var_dump($r->send());
print_r($r->getResponseInfo());
+$r->setMethod(HTTP_POST);
+$r->addPostFields(array('q'=>'foobar','start'=>10));
+$r->send();
+var_dump($r->getResponseCode());
+var_dump(false != strstr($r->getResponseBody(), "Not Implemented"));
?>
--EXPECTF--
Content-type: text/html
?>
--EXPECTF--
Content-type: text/html
@@
-43,3
+48,5
@@
Array
[proxyauth_avail] => %d
[num_connects] => %d
)
[proxyauth_avail] => %d
[num_connects] => %d
)
+int(501)
+bool(true)