summaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/unit/APIResourceTest.php6
1 files changed, 6 insertions, 0 deletions
diff --git a/test/unit/APIResourceTest.php b/test/unit/APIResourceTest.php
index c2b0c2a..8552815 100644
--- a/test/unit/APIResourceTest.php
+++ b/test/unit/APIResourceTest.php
@@ -131,12 +131,18 @@ class APIResourceTest extends \PHPUnit_Framework_TestCase {
}
public function testAdapter403Exception() {
+ $testBody = [ 'errors' => [
+ [
+ 'message' => 'Forbidden.'
+ ]
+ ]];
try {
$responseMock = Mockery::mock();
$this->sparkPostMock->httpAdapter->shouldReceive('send')->
once()->
andReturn($responseMock);
$responseMock->shouldReceive('getStatusCode')->andReturn(403);
+ $responseMock->shouldReceive('getBody')->andReturn(json_encode($testBody));
$this->resource->get('test');
}