File tree Expand file tree Collapse file tree 1 file changed +3
-0
lines changed Expand file tree Collapse file tree 1 file changed +3
-0
lines changed Original file line number Diff line number Diff line change @@ -56,10 +56,12 @@ certain responses::
56
56
57
57
$response = $this->getMock('Psr\Http\Message\ResponseInterface');
58
58
$client->addResponse($response);
59
+ $this->assertSame($response, $client->getLastResponse());
59
60
60
61
// $request is an instance of Psr\Http\Message\RequestInterface
61
62
$returnedResponse = $client->sendRequest($request);
62
63
$this->assertSame($response, $returnedResponse);
64
+ $this->assertSame($request, $client->getLastRequest());
63
65
}
64
66
}
65
67
@@ -78,6 +80,7 @@ To fake an exception being thrown::
78
80
79
81
$exception = new \Exception('Whoops!');
80
82
$client->addException($exception);
83
+ $this->assertSame($exception, $client->getLastException());
81
84
82
85
// $request is an instance of Psr\Http\Message\RequestInterface
83
86
$returnedResponse = $client->sendRequest($request);
You can’t perform that action at this time.
0 commit comments