diff --git a/CHANGELOG.md b/CHANGELOG.md index 09f118c..5b709a1 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,8 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/) and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html). +## [Unreleased] + ## [3.0.9] - 2024-01-09 ### Fixed - expired MFA code verification diff --git a/src/SmsapiClient.php b/src/SmsapiClient.php index c40e21a..564843f 100644 --- a/src/SmsapiClient.php +++ b/src/SmsapiClient.php @@ -12,7 +12,7 @@ */ interface SmsapiClient extends LoggerAwareInterface { - const VERSION = '3.0.9'; + const VERSION = 'Unreleased'; public function smsapiPlService(string $apiToken): SmsapiPlService; diff --git a/tests/Unit/Infrastructure/ResponseMapper/RestResponseMapperTest.php b/tests/Unit/Infrastructure/ResponseMapper/RestResponseMapperTest.php index dfbb087..9419e90 100644 --- a/tests/Unit/Infrastructure/ResponseMapper/RestResponseMapperTest.php +++ b/tests/Unit/Infrastructure/ResponseMapper/RestResponseMapperTest.php @@ -92,6 +92,18 @@ public function it_should_throw_exception_on_service_unavailable() $this->restResponseMapper->map($responseWithServiceUnavailable); } + /** + * @test + */ + public function it_should_throw_exception_on_request_timeout() + { + $responseWithServiceUnavailable = new Response(ResponseHttpCode::REQUEST_TIMEOUT); + + $this->expectException(ApiErrorException::class); + $this->expectExceptionMessage("Request timed out"); + $this->restResponseMapper->map($responseWithServiceUnavailable); + } + /** * @test */