X-Git-Url: https://git.m6w6.name/?a=blobdiff_plain;f=tests%2Fclient012.phpt;fp=tests%2Fclient012.phpt;h=71e5081a5f938220b3f7639ef9bd08702b756125;hb=87db9817d428282792c8146d9c2ae9748ebf6f1e;hp=0000000000000000000000000000000000000000;hpb=7a5c865f6faf8b1b6c91735e9d3b040449ea74ba;p=m6w6%2Fext-http diff --git a/tests/client012.phpt b/tests/client012.phpt new file mode 100644 index 0000000..71e5081 --- /dev/null +++ b/tests/client012.phpt @@ -0,0 +1,36 @@ +--TEST-- +client ssl +--SKIPIF-- + +--FILE-- +setSslOptions(array("verify_peer" => true)); +$client->addSslOptions(array("verify_host" => 2)); +var_dump( + array( + "verify_peer" => true, + "verify_host" => 2, + ) === $client->getSslOptions() +); + +$client->enqueue($req = new http\Client\Request("GET", "https://twitter.com/")); +$client->send(); + +$ti = (array) $client->getTransferInfo($req); +var_dump(array_key_exists("ssl_engines", $ti)); +var_dump(0 < count($ti["ssl_engines"])); +?> +Done +--EXPECTF-- +Test +bool(true) +bool(true) +bool(true) +Done