mirror of
https://github.com/php-curl-class/php-curl-class.git
synced 2026-08-30 04:01:47 +00:00
Add allowed error that occurs when running unit tests inside container
This commit is contained in:
@@ -1106,7 +1106,7 @@ class CurlTest extends \PHPUnit\Framework\TestCase
|
||||
$test->curl->get(Test::ERROR_URL);
|
||||
$this->assertTrue($test->curl->error);
|
||||
$this->assertTrue($test->curl->curlError);
|
||||
$possible_errors = array(CURLE_SEND_ERROR, CURLE_OPERATION_TIMEOUTED, CURLE_COULDNT_CONNECT);
|
||||
$possible_errors = array(CURLE_SEND_ERROR, CURLE_OPERATION_TIMEOUTED, CURLE_COULDNT_CONNECT, CURLE_GOT_NOTHING);
|
||||
$this->assertTrue(
|
||||
in_array($test->curl->errorCode, $possible_errors, true),
|
||||
'errorCode: ' . $test->curl->errorCode
|
||||
|
||||
@@ -601,7 +601,8 @@ class MultiCurlTest extends \PHPUnit\Framework\TestCase
|
||||
\PHPUnit\Framework\Assert::assertTrue($instance->error);
|
||||
\PHPUnit\Framework\Assert::assertTrue($instance->curlError);
|
||||
\PHPUnit\Framework\Assert::assertFalse($instance->httpError);
|
||||
$possible_errors = array(CURLE_SEND_ERROR, CURLE_OPERATION_TIMEOUTED, CURLE_COULDNT_CONNECT);
|
||||
$possible_errors = array(
|
||||
CURLE_SEND_ERROR, CURLE_OPERATION_TIMEOUTED, CURLE_COULDNT_CONNECT, CURLE_GOT_NOTHING);
|
||||
\PHPUnit\Framework\Assert::assertTrue(
|
||||
in_array($instance->errorCode, $possible_errors, true),
|
||||
'errorCode: ' . $instance->errorCode
|
||||
|
||||
Reference in New Issue
Block a user