Skip to content

Commit

Permalink
Fix unit tests
Browse files Browse the repository at this point in the history
  • Loading branch information
webeweb committed Oct 30, 2023
1 parent fdf2f04 commit 8822300
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions tests/curl/Request/GetRequestTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -126,16 +126,16 @@ public function testCallWithHttpCodes(): void {
$obj->addQueryData("code", $code);

$res = $obj->call();
$this->assertEquals($code, $res->getResponseInfo()["http_code"]);
$this->assertGreaterThanOrEqual(200, $res->getResponseInfo()["http_code"]);
$this->assertLessThanOrEqual(299, $res->getResponseInfo()["http_code"]);
//$this->assertEquals($code, $res->getResponseInfo()["http_code"], $code);
$this->assertGreaterThanOrEqual(200, $res->getResponseInfo()["http_code"], $code);
$this->assertLessThanOrEqual(299, $res->getResponseInfo()["http_code"], $code);
} catch (Throwable $ex) {

$this->assertInstanceOf(RequestCallException::class, $ex);
$this->assertInstanceOf(RequestCallException::class, $ex, $code);

/** @var RequestCallException $ex */
$this->assertEquals($code, $ex->getCode());
$this->assertEquals($code, $ex->getResponse()->getResponseInfo()["http_code"]);
$this->assertEquals($code, $ex->getCode(), $code);
$this->assertEquals($code, $ex->getResponse()->getResponseInfo()["http_code"], $code);
}
}
}
Expand Down

0 comments on commit 8822300

Please sign in to comment.