Skip to content

Commit 99111fb

Browse files
-
1 parent e4bbf9d commit 99111fb

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

tests/Php84/Php84Test.php

+5-3
Original file line numberDiff line numberDiff line change
@@ -70,10 +70,12 @@ public function testArrayAll(array $array, callable $callback, bool $expected)
7070
public function testCurlHttp3Constants()
7171
{
7272
$ch = curl_init();
73-
$hasH3 = defined('CURL_VERSION_HTTP3') && (curl_version()['features'] & CURL_VERSION_HTTP3);
7473

75-
$this->assertSame($hasH3, curl_setopt($ch, CURLOPT_HTTP_VERSION, CURL_HTTP_VERSION_3));
76-
$this->assertSame($hasH3 && defined('CURLOPT_SSH_HOST_PUBLIC_KEY_SHA256'), curl_setopt($ch, CURLOPT_HTTP_VERSION, CURL_HTTP_VERSION_3ONLY));
74+
$this->assertIsBool(curl_setopt($ch, CURLOPT_HTTP_VERSION, CURL_HTTP_VERSION_3));
75+
76+
if (defined('CURLOPT_SSH_HOST_PUBLIC_KEY_SHA256')) {
77+
$this->assertIsBool(curl_setopt($ch, CURLOPT_HTTP_VERSION, CURL_HTTP_VERSION_3ONLY));
78+
}
7779
}
7880

7981
public static function ucFirstDataProvider(): array

0 commit comments

Comments
 (0)