Merge pull request #121 from m6w6/issue-120
[m6w6/ext-http] / tests / client012.phpt
index bb599db44c2619b1eac6612f84d7b74f098ac5c1..5dd15133dea9179e483db8bfe1efb9050cd7c172 100644 (file)
@@ -6,6 +6,8 @@ include "skipif.inc";
 skip_online_test();
 skip_client_test();
 skip_curl_test("7.34.0");
+if (strpos(http\Client\Curl\Versions\SSL, "SecureTransport") !== false)
+       die("skip SecureTransport\n");
 ?>
 --FILE--
 <?php 
@@ -24,6 +26,8 @@ var_dump(
 
 $client->attach($observer = new class implements SplObserver { 
        public $data = [];
+
+       #[ReturnTypeWillChange]
        function update(SplSubject $client, $req = null, $progress = null) {
                $ti = $client->getTransferInfo($req);
                if (isset($ti->tls_session["internals"])) {
@@ -43,7 +47,9 @@ switch ($client->getTransferInfo($req)->tls_session["backend"]) {
        case "openssl":
        case "gnutls":
                if (count($observer->data) < 1) {
-                       die("failed count(ssl.internals) >= 1\n");
+                       printf("%s: failed count(ssl.internals) >= 1\n", $client->getTransferInfo($req)->tls_session["backend"]);
+                       var_dump($observer);
+                       exit;
                }
                break;
        default: