Last active
November 17, 2020 06:06
-
-
Save chillbits-legacy/b1a9af9390955247a2269f414ea90039 to your computer and use it in GitHub Desktop.
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
<?php | |
Class Test { | |
public function test_update_order_status_but_get_unexpected_response() | |
{ | |
$response = '<html random tag from server>'; | |
$this->mockingHttpClientWith($response); | |
$service = new WebsiteService(); | |
$order = $this->getCompletedOrder(); | |
try { | |
$service->updateOrderStatus($order->id); | |
$this->fail('Expected exception 5520201117 not thrown'); | |
}catch(\Exception $exception) { | |
$this->assertEquals(5520201117, $exception->getCode()); | |
$this->assertEquals('Unexpected response from server', $exception->getMessage()); | |
} | |
} | |
} |
Author
chillbits-legacy
commented
Nov 17, 2020
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment