summaryrefslogtreecommitdiffstats
path: root/test/unit/APIResourceTest.php
diff options
context:
space:
mode:
Diffstat (limited to 'test/unit/APIResourceTest.php')
-rw-r--r--test/unit/APIResourceTest.php2
1 files changed, 2 insertions, 0 deletions
diff --git a/test/unit/APIResourceTest.php b/test/unit/APIResourceTest.php
index 18b0d3f..0baef41 100644
--- a/test/unit/APIResourceTest.php
+++ b/test/unit/APIResourceTest.php
@@ -113,11 +113,13 @@ class APIResourceTest extends \PHPUnit_Framework_TestCase {
public function testAdapter4XXException() {
try {
+ $testBody = ['errors'=>['my'=>'test']];
$responseMock = Mockery::mock();
$this->sparkPostMock->httpAdapter->shouldReceive('send')->
once()->
andReturn($responseMock);
$responseMock->shouldReceive('getStatusCode')->andReturn(400);
+ $responseMock->shouldReceive('getBody')->andReturn(json_encode($testBody));
$this->resource->get('test');
}