Skip to content

Commit

Permalink
Adds request timeout response test
Browse files Browse the repository at this point in the history
  • Loading branch information
maciejlew committed Jan 10, 2024
1 parent 3970c2b commit 93d11f4
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 1 deletion.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion src/SmsapiClient.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
*/
interface SmsapiClient extends LoggerAwareInterface
{
const VERSION = '3.0.9';
const VERSION = 'Unreleased';

public function smsapiPlService(string $apiToken): SmsapiPlService;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
*/
Expand Down

0 comments on commit 93d11f4

Please sign in to comment.