projects
/
m6w6
/
ext-http
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
|
github
raw
|
inline
| side by side
- Fixed ZTS build
[m6w6/ext-http]
/
tests
/
HttpRequest_003.phpt
diff --git
a/tests/HttpRequest_003.phpt
b/tests/HttpRequest_003.phpt
index 40d0ba92a53d7ed2745abdf34f56dc26a6d15a96..723091afeb3b986c415febde477dea46190e37b3 100644
(file)
--- a/
tests/HttpRequest_003.phpt
+++ b/
tests/HttpRequest_003.phpt
@@
-3,18
+3,52
@@
HttpRequest SSL
--SKIPIF--
<?php
include 'skip.inc';
--SKIPIF--
<?php
include 'skip.inc';
-check
ver(5
);
+check
min("5.2.5"
);
checkurl('arweb.info');
checkurl('arweb.info');
+skipif(!http_support(HTTP_SUPPORT_SSLREQUESTS), 'need ssl-request support')
?>
--FILE--
<?php
?>
--FILE--
<?php
-$r = new HttpRequest('https://ssl.arweb.info/iworks/data.txt');
+echo "-TEST\n";
+$o = array('redirect' => '3', 'ssl' => array('version' => '3', 'verifyhost' => '1'));
+$r = new HttpRequest('https://ssl.irmler.at/iworks/data.txt');
+$r->setOptions($o);
$r->send();
var_dump($r->getResponseBody());
$r->send();
var_dump($r->getResponseBody());
+var_dump(is_object($r->getResponseMessage()));
+var_dump(is_object($r->getResponseMessage()));
+var_dump(is_object($r->getResponseMessage()));
+var_dump($o);
+$r->setOptions($o);
+$r->send();
+var_dump($o);
?>
--EXPECTF--
?>
--EXPECTF--
-Content-type: text/html
-X-Powered-By: PHP/%s
-
+%aTEST
string(10) "1234567890"
string(10) "1234567890"
+bool(true)
+bool(true)
+bool(true)
+array(2) {
+ ["redirect"]=>
+ string(1) "3"
+ ["ssl"]=>
+ array(2) {
+ ["version"]=>
+ string(1) "3"
+ ["verifyhost"]=>
+ string(1) "1"
+ }
+}
+array(2) {
+ ["redirect"]=>
+ string(1) "3"
+ ["ssl"]=>
+ array(2) {
+ ["version"]=>
+ string(1) "3"
+ ["verifyhost"]=>
+ string(1) "1"
+ }
+}