Skip to content

Commit 46a38ee

Browse files
committed
Fix test coverage
1 parent b91a2f6 commit 46a38ee

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

test/unit/APIResourceTest.php

+2
Original file line numberDiff line numberDiff line change
@@ -113,11 +113,13 @@ public function testAdapter404Exception() {
113113

114114
public function testAdapter4XXException() {
115115
try {
116+
$testBody = ['errors'=>['my'=>'test']];
116117
$responseMock = Mockery::mock();
117118
$this->sparkPostMock->httpAdapter->shouldReceive('send')->
118119
once()->
119120
andReturn($responseMock);
120121
$responseMock->shouldReceive('getStatusCode')->andReturn(400);
122+
$responseMock->shouldReceive('getBody')->andReturn(json_encode($testBody));
121123

122124
$this->resource->get('test');
123125
}

0 commit comments

Comments
 (0)