mirror of
https://github.com/retailcrm/mailgun-php.git
synced 2024-11-25 22:36:06 +03:00
tests
This commit is contained in:
parent
a0352e8f51
commit
9b270d07b8
@ -60,4 +60,12 @@ class HttpClientExceptionTest extends MailgunTestCase
|
||||
$exception = HttpClientException::forbidden($response);
|
||||
$this->assertStringEndsWith('<html><body>Forbidden</body></html>', $exception->getMessage());
|
||||
}
|
||||
|
||||
public function testTooManyRequestsGetMessage()
|
||||
{
|
||||
$response = new Response(429, ['Content-Type' => 'text/html']);
|
||||
$exception = HttpClientException::tooManyRequests($response);
|
||||
$this->assertEquals('Too many requests.', $exception->getMessage());
|
||||
$this->assertEquals($response->getStatusCode(), $exception->getCode());
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user