public function testPurchaseNoMessageNoResponseCode() { $httpResponse = $this->getMockHttpResponse('NoMessageNoResponseCodeFailure.txt'); $response = new PurchaseResponse($this->getMockRequest(), $httpResponse->xml()); $this->assertNull($response->getMessage()); $this->assertNull($response->getResponseCode()); }
public function testPurchaseFailure() { $httpResponse = $this->getMockHttpResponse('PurchaseRequestFailure.txt'); $response = new PurchaseResponse($this->getMockRequest(), $httpResponse->xml()); $this->assertFalse($response->isSuccessful()); $this->assertSame('Valid Format', $response->getMessage()); $this->assertSame('1', $response->getResponseCode()); $this->assertNull($response->getTransactionReference()); $this->assertNull($response->getOrderId()); $this->assertNull($response->getAuthCode()); $this->assertNull($response->getCardValidationResult()); $this->assertNull($response->getAvsResult()); }