-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1 from OpenClassrooms/OC-5468_fix_500_on_command
handle 500 errors
- Loading branch information
Showing
2 changed files
with
14 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -110,6 +110,16 @@ public function WithFileNotOnApiException_download_DoNothing() | |
$this->gateway->downloadTranslations([new ExportFileStub1()]); | ||
} | ||
|
||
/** | ||
* @test | ||
* @expectedException \Guzzle\Http\Exception\ServerErrorResponseException | ||
*/ | ||
public function ApiServerError_download_ThrowException() | ||
{ | ||
ClientMock::$downloadedContent = '{"meta":{"status":500,"message":"Something went wrong. Please try again or contact us at [email protected]"},"data":{}}'; | ||
$this->gateway->downloadTranslations([new ExportFileStub1()]); | ||
} | ||
|
||
/** | ||
* @test | ||
*/ | ||
|