Skip to content

Commit fddd222

Browse files
committed
Add additional possible error
1 parent d736b56 commit fddd222

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

tests/PHPCurlClass/PHPCurlClassTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1106,7 +1106,7 @@ public function testError()
11061106
$test->curl->get(Test::ERROR_URL);
11071107
$this->assertTrue($test->curl->error);
11081108
$this->assertTrue($test->curl->curlError);
1109-
$possible_errors = array(CURLE_SEND_ERROR, CURLE_OPERATION_TIMEOUTED);
1109+
$possible_errors = array(CURLE_SEND_ERROR, CURLE_OPERATION_TIMEOUTED, CURLE_COULDNT_CONNECT);
11101110
$this->assertTrue(
11111111
in_array($test->curl->errorCode, $possible_errors, true),
11121112
'errorCode: ' . $test->curl->errorCode

tests/PHPCurlClass/PHPMultiCurlClassTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -601,7 +601,7 @@ public function testMultiCurlCallbackError()
601601
\PHPUnit\Framework\Assert::assertTrue($instance->error);
602602
\PHPUnit\Framework\Assert::assertTrue($instance->curlError);
603603
\PHPUnit\Framework\Assert::assertFalse($instance->httpError);
604-
$possible_errors = array(CURLE_SEND_ERROR, CURLE_OPERATION_TIMEOUTED);
604+
$possible_errors = array(CURLE_SEND_ERROR, CURLE_OPERATION_TIMEOUTED, CURLE_COULDNT_CONNECT);
605605
\PHPUnit\Framework\Assert::assertTrue(
606606
in_array($instance->errorCode, $possible_errors, true),
607607
'errorCode: ' . $instance->errorCode

0 commit comments

Comments
 (0)