diff --git a/tests/Message/AuthorizeRequestTest.php b/tests/Message/AuthorizeRequestTest.php index 36128b7..7571703 100644 --- a/tests/Message/AuthorizeRequestTest.php +++ b/tests/Message/AuthorizeRequestTest.php @@ -20,7 +20,7 @@ public function setUp() ); } - public function testAuthorizeSuccess() + public function testSendSuccess() { $this->setMockHttpResponse('AuthorizeRequestSuccess.txt'); $response = $this->request->send(); @@ -29,7 +29,16 @@ public function testAuthorizeSuccess() $this->assertSame('Approved', $response->getMessage()); } - public function testAuthorizeInsufficentFunds() + public function testAuthorizeSendError() + { + $this->setMockHttpResponse('NoMessageNoResponseCodeFailure.txt'); + $response = $this->request->send(); + $this->assertFalse($response->isSuccessful()); + $this->assertNull($response->getMessage()); + $this->assertNull($response->getResponseCode()); + } + + public function testSendInsufficentFunds() { $this->setMockHttpResponse('AuthorizeRequestInsufficientFunds.txt'); $response = $this->request->send(); diff --git a/tests/Message/PurchaseRequestTest.php b/tests/Message/PurchaseRequestTest.php index 8c17b50..756ccc3 100644 --- a/tests/Message/PurchaseRequestTest.php +++ b/tests/Message/PurchaseRequestTest.php @@ -30,6 +30,15 @@ public function testSendSuccess() } public function testSendError() + { + $this->setMockHttpResponse('NoMessageNoResponseCodeFailure.txt'); + $response = $this->request->send(); + $this->assertFalse($response->isSuccessful()); + $this->assertNull($response->getMessage()); + $this->assertNull($response->getResponseCode()); + } + + public function testSendFailure() { $this->setMockHttpResponse('PurchaseRequestFailure.txt'); $response = $this->request->send();