public shouldReturnInvalidIfResponseContentInvalid ( ) |
public function shouldReturnInvalidIfResponseContentInvalid()
{
$clientMock = $this->createHttpClientMock();
$clientMock->expects($this->once())->method('send')->will($this->returnCallback(function (RequestInterface $request) {
return new Response(200, array(), Api::NOTIFY_INVALID);
}));
$api = new Api(array('sandbox' => false), $clientMock, $this->createHttpMessageFactory());
$this->assertEquals(Api::NOTIFY_INVALID, $api->notifyValidate(array()));
}