diff --git a/tests/Exception/HttpClientExceptionTest.php b/tests/Exception/HttpClientExceptionTest.php index c194df9..89589da 100644 --- a/tests/Exception/HttpClientExceptionTest.php +++ b/tests/Exception/HttpClientExceptionTest.php @@ -60,4 +60,12 @@ class HttpClientExceptionTest extends MailgunTestCase $exception = HttpClientException::forbidden($response); $this->assertStringEndsWith('Forbidden', $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()); + } }