8000 minor #31308 [HttpClient] fix skipping h2push test case (nicolas-grekas) · symfony/symfony@002b48d · GitHub
[go: up one dir, main page]

Skip to content

Commit 002b48d

Browse files
committed
minor #31308 [HttpClient] fix skipping h2push test case (nicolas-grekas)
This PR was merged into the 4.3-dev branch. Discussion ---------- [HttpClient] fix skipping h2push test case | Q | A | ------------- | --- | Branch? | master | Bug fix? | no | New feature? | no | BC breaks? | no | Deprecations? | no | Tests pass? | yes | Fixed tickets | #30975 | License | MIT | Doc PR | - Commits ------- 3aaa742 [HttpClient] fix skipping h2push test case
2 parents 584c21b + 3aaa742 commit 002b48d

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

src/Symfony/Component/HttpClient/Tests/CurlHttpClientTest.php

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,16 +28,15 @@ protected function getHttpClient(string $testCase): HttpClientInterface
2828

2929
/**
3030
* @requires PHP 7.2.17
31-
* @requires extension curl 7.61
3231
*/
3332
public function testHttp2Push()
3433
{
3534
if (\PHP_VERSION_ID >= 70300 && \PHP_VERSION_ID < 70304) {
3635
$this->markTestSkipped('PHP 7.3.0 to 7.3.3 don\'t support HTTP/2 PUSH');
3736
}
3837

39-
if (!\defined('CURLMOPT_PUSHFUNCTION') || !(CURL_VERSION_HTTP2 & curl_version()['features'])) {
40-
$this->markTestSkipped('curl is not compiled with support for HTTP/2 PUSH');
38+
if (!\defined('CURLMOPT_PUSHFUNCTION') || 0x073d00 > ($v = curl_version())['version_number'] || !(CURL_VERSION_HTTP2 & $v['features'])) {
39+
$this->markTestSkipped('curl <7.61 is used or it is not compiled with support for HTTP/2 PUSH');
4140
}
4241

4342
$logger = new class() extends AbstractLogger {

0 commit comments

Comments
 (0)
0