Merge pull request #19055 from kamil-tekiela/curl_close

Remove curl_close from TestBase
This commit is contained in:
Maurício Meneghini Fauth 2024-03-15 18:58:01 -03:00 committed by GitHub
commit 3ed41246bd
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 11 additions and 12 deletions

View File

@ -15140,6 +15140,11 @@ parameters:
count: 2
path: tests/end-to-end/TestBase.php
-
message: "#^Only booleans are allowed in a negated boolean, int given\\.$#"
count: 2
path: tests/end-to-end/TestBase.php
-
message: "#^Only booleans are allowed in a negated boolean, int\\|false given\\.$#"
count: 1
@ -15155,11 +15160,6 @@ parameters:
count: 1
path: tests/end-to-end/TestBase.php
-
message: "#^Only booleans are allowed in an if condition, int given\\.$#"
count: 2
path: tests/end-to-end/TestBase.php
-
message: "#^Only booleans are allowed in an if condition, string\\|false given\\.$#"
count: 2

View File

@ -22,7 +22,6 @@ use PHPUnit\Framework\TestCase;
use Throwable;
use function bin2hex;
use function curl_close;
use function curl_errno;
use function curl_error;
use function curl_exec;
@ -1139,11 +1138,11 @@ JS;
curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);
curl_exec($ch);
if (curl_errno($ch)) {
echo 'Error: ' . curl_error($ch) . "\n";
if (! curl_errno($ch)) {
return;
}
curl_close($ch);
echo 'Error: ' . curl_error($ch) . "\n";
}
private function getErrorVideoUrl(): void
@ -1173,11 +1172,11 @@ JS;
echo 'Test failed, get more information here: ' . $proj->automation_session->public_url . "\n";
}
if (curl_errno($ch)) {
echo 'Error: ' . curl_error($ch) . "\n";
if (! curl_errno($ch)) {
return;
}
curl_close($ch);
echo 'Error: ' . curl_error($ch) . "\n";
}
/**