diff --git a/tests/CheckGatewayTest.php b/tests/CheckGatewayTest.php index b6f9903..875a506 100644 --- a/tests/CheckGatewayTest.php +++ b/tests/CheckGatewayTest.php @@ -26,7 +26,7 @@ public function setUp() public function testAuthorizeSuccess() { - $this->setMockHttpResponse('../Messages/Check/Mock/ResponseSuccess.txt'); + $this->setMockHttpResponse('Check/ResponseSuccess.txt'); $this->gateway->setPassword('demo123'); $response = $this->gateway->authorize($this->options)->send(); @@ -43,7 +43,7 @@ public function testAuthorizeSuccess() public function testAuthorizeFailure() { - $this->setMockHttpResponse('../Messages/Check/Mock/ResponseFailed.txt'); + $this->setMockHttpResponse('Check/ResponseFailed.txt'); $this->gateway->setPassword('111'); $response = $this->gateway->authorize($this->options)->send(); @@ -55,7 +55,7 @@ public function testAuthorizeFailure() public function testPurchaseSuccess() { - $this->setMockHttpResponse('../Messages/Check/Mock/ResponseSuccess.txt'); + $this->setMockHttpResponse('Check/ResponseSuccess.txt'); $this->gateway->setPassword('demo123'); $response = $this->gateway->purchase($this->options)->send(); @@ -72,7 +72,7 @@ public function testPurchaseSuccess() public function testPurchaseFailure() { - $this->setMockHttpResponse('../Messages/Check/Mock/ResponseFailed.txt'); + $this->setMockHttpResponse('Check/ResponseFailed.txt'); $this->gateway->setPassword('111'); $response = $this->gateway->purchase($this->options)->send(); @@ -84,7 +84,7 @@ public function testPurchaseFailure() public function testRefundSuccess() { - $this->setMockHttpResponse('../Messages/Check/Mock/RefundResponseSuccess.txt'); + $this->setMockHttpResponse('Check/RefundResponseSuccess.txt'); $this->gateway->setPassword('demo123'); $response = $this->gateway->refund($this->options)->send(); @@ -101,7 +101,7 @@ public function testRefundSuccess() public function testRefundTransactionReferenceSuccess() { - $this->setMockHttpResponse('../Messages/Check/Mock/RefundResponseSuccess.txt'); + $this->setMockHttpResponse('Check/RefundResponseSuccess.txt'); $this->gateway->setPassword('demo123'); $options = array_merge(array('transactionReference' => 89731989), $this->options); @@ -120,7 +120,7 @@ public function testRefundTransactionReferenceSuccess() public function testRefundFailure() { - $this->setMockHttpResponse('../Messages/Check/Mock/ResponseFailed.txt'); + $this->setMockHttpResponse('Check/ResponseFailed.txt'); $this->gateway->setPassword('111'); $response = $this->gateway->refund($this->options)->send(); @@ -132,7 +132,7 @@ public function testRefundFailure() public function testCreateCardSuccess() { - $this->setMockHttpResponse('../Messages/Check/Mock/CreateCardResponseSuccess.txt'); + $this->setMockHttpResponse('Check/CreateCardResponseSuccess.txt'); $this->gateway->setPassword('demo123'); $response = $this->gateway->createCard($this->options)->send(); diff --git a/tests/CreditCardGatewayTest.php b/tests/CreditCardGatewayTest.php index 8e5b23c..c2ef06a 100644 --- a/tests/CreditCardGatewayTest.php +++ b/tests/CreditCardGatewayTest.php @@ -22,7 +22,7 @@ public function setUp() public function testAuthorizeSuccess() { - $this->setMockHttpResponse('../Messages/CreditCard/Mock/AuthorizeResponseSuccess.txt'); + $this->setMockHttpResponse('CreditCard/AuthorizeResponseSuccess.txt'); $this->gateway->setPassword('demo123'); $response = $this->gateway->authorize($this->options)->send(); @@ -39,7 +39,7 @@ public function testAuthorizeSuccess() public function testAuthorizeFailure() { - $this->setMockHttpResponse('ResponseFailed.txt'); + $this->setMockHttpResponse('CreditCard/ResponseFailed.txt'); $this->gateway->setPassword('111'); $response = $this->gateway->authorize($this->options)->send(); @@ -51,7 +51,7 @@ public function testAuthorizeFailure() public function testPurchaseSuccess() { - $this->setMockHttpResponse('../Messages/CreditCard/Mock/AuthorizeResponseSuccess.txt'); + $this->setMockHttpResponse('CreditCard/AuthorizeResponseSuccess.txt'); $this->gateway->setPassword('demo123'); $response = $this->gateway->purchase($this->options)->send(); @@ -68,7 +68,7 @@ public function testPurchaseSuccess() public function testPurchaseCreditReferenceSuccess() { - $this->setMockHttpResponse('../Messages/CreditCard/Mock/AuthorizeResponseSuccess.txt'); + $this->setMockHttpResponse('CreditCard/AuthorizeResponseSuccess.txt'); $this->gateway->setPassword('demo123'); $options = array_merge(array('cardReference' => 1234567890), $this->options); @@ -86,7 +86,7 @@ public function testPurchaseCreditReferenceSuccess() public function testPurchaseFailure() { - $this->setMockHttpResponse('ResponseFailed.txt'); + $this->setMockHttpResponse('CreditCard/ResponseFailed.txt'); $this->gateway->setPassword('111'); $response = $this->gateway->purchase($this->options)->send(); @@ -98,7 +98,7 @@ public function testPurchaseFailure() public function testRefundSuccess() { - $this->setMockHttpResponse('../Messages/CreditCard/Mock/RefundResponseSuccess.txt'); + $this->setMockHttpResponse('CreditCard/RefundResponseSuccess.txt'); $this->gateway->setPassword('demo123'); $response = $this->gateway->refund($this->options)->send(); @@ -115,7 +115,7 @@ public function testRefundSuccess() public function testRefundTransactionReferenceSuccess() { - $this->setMockHttpResponse('../Messages/CreditCard/Mock/RefundResponseSuccess.txt'); + $this->setMockHttpResponse('CreditCard/RefundResponseSuccess.txt'); $this->gateway->setPassword('demo123'); $options = array_merge(array('transactionReference' => 89731989), $this->options); @@ -134,7 +134,7 @@ public function testRefundTransactionReferenceSuccess() public function testRefundFailure() { - $this->setMockHttpResponse('../Messages/CreditCard/Mock/ResponseFailed.txt'); + $this->setMockHttpResponse('CreditCard/ResponseFailed.txt'); $this->gateway->setPassword('111'); $response = $this->gateway->refund($this->options)->send(); @@ -146,7 +146,7 @@ public function testRefundFailure() public function testCreateCardSuccess() { - $this->setMockHttpResponse('../Messages/CreditCard/Mock/CreateCardResponseSuccess.txt'); + $this->setMockHttpResponse('CreditCard/CreateCardResponseSuccess.txt'); $this->gateway->setPassword('demo123'); $response = $this->gateway->createCard($this->options)->send(); @@ -165,7 +165,7 @@ public function testCreateCardSuccess() public function testUpdateCardSuccess() { $customer_id = 14496097; - $this->setMockHttpResponse('../Messages/CreditCard/Mock/UpdateCardResponseSuccess.txt'); + $this->setMockHttpResponse('CreditCard/UpdateCardResponseSuccess.txt'); $this->gateway->setPassword('demo123'); $request = $this->gateway->updateCard($this->options); diff --git a/tests/Messages/Check/Mock/empty b/tests/Messages/Check/Mock/empty new file mode 100644 index 0000000..c6cac69 --- /dev/null +++ b/tests/Messages/Check/Mock/empty @@ -0,0 +1 @@ +empty diff --git a/tests/Messages/Check/ResponseTest.php b/tests/Messages/Check/ResponseTest.php index 9612b95..0c7ec31 100644 --- a/tests/Messages/Check/ResponseTest.php +++ b/tests/Messages/Check/ResponseTest.php @@ -8,7 +8,7 @@ class ResponseTest extends TestCase { public function testSuccess() { - $httpResponse = $this->getMockHttpResponse('ResponseSuccess.txt'); + $httpResponse = $this->getMockHttpResponse('../../../Mock/Check/ResponseSuccess.txt'); $response = new Response($this->getMockRequest(), $httpResponse->getBody()); $this->assertTrue($response->isSuccessful()); $this->assertSame('121', $response->getCode()); @@ -20,7 +20,7 @@ public function testSuccess() public function testFail() { - $httpResponse = $this->getMockHttpResponse('ResponseFailed.txt'); + $httpResponse = $this->getMockHttpResponse('../../../Mock/Check/ResponseFailed.txt'); $response = new Response($this->getMockRequest(), $httpResponse->getBody()); $this->assertFalse($response->isSuccessful()); $this->assertSame('998', $response->getCode()); diff --git a/tests/Messages/CreditCard/AuthorizeResponseTest.php b/tests/Messages/CreditCard/AuthorizeResponseTest.php index afb6804..78965e9 100644 --- a/tests/Messages/CreditCard/AuthorizeResponseTest.php +++ b/tests/Messages/CreditCard/AuthorizeResponseTest.php @@ -8,7 +8,7 @@ class AuthorizeResponseTest extends TestCase { public function testSuccess() { - $httpResponse = $this->getMockHttpResponse('AuthorizeResponseSuccess.txt'); + $httpResponse = $this->getMockHttpResponse('../../../Mock/CreditCard/AuthorizeResponseSuccess.txt'); $response = new AuthorizeResponse($this->getMockRequest(), $httpResponse->getBody()); $this->assertTrue($response->isSuccessful()); $this->assertSame('104', $response->getCode()); @@ -20,7 +20,7 @@ public function testSuccess() public function testFail() { - $httpResponse = $this->getMockHttpResponse('AuthorizeResponseFailed.txt'); + $httpResponse = $this->getMockHttpResponse('../../../Mock/CreditCard/AuthorizeResponseFailed.txt'); $response = new AuthorizeResponse($this->getMockRequest(), $httpResponse->getBody()); $this->assertFalse($response->isSuccessful()); $this->assertSame('105', $response->getCode()); diff --git a/tests/Messages/CreditCard/CaptureResponseTest.php b/tests/Messages/CreditCard/CaptureResponseTest.php index ef7a682..523e8b7 100644 --- a/tests/Messages/CreditCard/CaptureResponseTest.php +++ b/tests/Messages/CreditCard/CaptureResponseTest.php @@ -8,7 +8,7 @@ class CaptureResponseTest extends TestCase { public function testSuccess() { - $httpResponse = $this->getMockHttpResponse('CaptureResponseSuccess.txt'); + $httpResponse = $this->getMockHttpResponse('../../../Mock/CreditCard/CaptureResponseSuccess.txt'); $response = new CaptureResponse($this->getMockRequest(), $httpResponse->getBody()); $this->assertTrue($response->isSuccessful()); $this->assertSame('114', $response->getCode()); @@ -20,7 +20,7 @@ public function testSuccess() public function testFail() { - $httpResponse = $this->getMockHttpResponse('ResponseFailed.txt'); + $httpResponse = $this->getMockHttpResponse('../../../Mock/CreditCard/ResponseFailed.txt'); $response = new CaptureResponse($this->getMockRequest(), $httpResponse->getBody()); $this->assertFalse($response->isSuccessful()); $this->assertSame('998', $response->getCode()); diff --git a/tests/Messages/CreditCard/CreateCardResponseTest.php b/tests/Messages/CreditCard/CreateCardResponseTest.php index d2032d1..e28fed8 100644 --- a/tests/Messages/CreditCard/CreateCardResponseTest.php +++ b/tests/Messages/CreditCard/CreateCardResponseTest.php @@ -8,7 +8,7 @@ class CreateCardResponseTest extends TestCase { public function testSuccess() { - $httpResponse = $this->getMockHttpResponse('CreateCardResponseSuccess.txt'); + $httpResponse = $this->getMockHttpResponse('../../../Mock/CreditCard/CreateCardResponseSuccess.txt'); $response = new CreateCardResponse($this->getMockRequest(), $httpResponse->getBody()); $this->assertTrue($response->isSuccessful()); $this->assertSame('160', $response->getCode()); @@ -20,7 +20,7 @@ public function testSuccess() public function testFail() { - $httpResponse = $this->getMockHttpResponse('ResponseFailed.txt'); + $httpResponse = $this->getMockHttpResponse('../../../Mock/CreditCard/ResponseFailed.txt'); $response = new CreateCardResponse($this->getMockRequest(), $httpResponse->getBody()); $this->assertFalse($response->isSuccessful()); $this->assertSame('998', $response->getCode()); diff --git a/tests/Messages/CreditCard/Mock/empty b/tests/Messages/CreditCard/Mock/empty new file mode 100644 index 0000000..c6cac69 --- /dev/null +++ b/tests/Messages/CreditCard/Mock/empty @@ -0,0 +1 @@ +empty diff --git a/tests/Messages/Check/Mock/CreateCardResponseSuccess.txt b/tests/Mock/Check/CreateCardResponseSuccess.txt similarity index 100% rename from tests/Messages/Check/Mock/CreateCardResponseSuccess.txt rename to tests/Mock/Check/CreateCardResponseSuccess.txt diff --git a/tests/Messages/Check/Mock/RefundResponseSuccess.txt b/tests/Mock/Check/RefundResponseSuccess.txt similarity index 100% rename from tests/Messages/Check/Mock/RefundResponseSuccess.txt rename to tests/Mock/Check/RefundResponseSuccess.txt diff --git a/tests/Messages/Check/Mock/ResponseFailed.txt b/tests/Mock/Check/ResponseFailed.txt similarity index 100% rename from tests/Messages/Check/Mock/ResponseFailed.txt rename to tests/Mock/Check/ResponseFailed.txt diff --git a/tests/Messages/Check/Mock/ResponseSuccess.txt b/tests/Mock/Check/ResponseSuccess.txt similarity index 100% rename from tests/Messages/Check/Mock/ResponseSuccess.txt rename to tests/Mock/Check/ResponseSuccess.txt diff --git a/tests/Messages/CreditCard/Mock/AuthorizeResponseFailed.txt b/tests/Mock/CreditCard/AuthorizeResponseFailed.txt similarity index 100% rename from tests/Messages/CreditCard/Mock/AuthorizeResponseFailed.txt rename to tests/Mock/CreditCard/AuthorizeResponseFailed.txt diff --git a/tests/Messages/CreditCard/Mock/AuthorizeResponseSuccess.txt b/tests/Mock/CreditCard/AuthorizeResponseSuccess.txt similarity index 100% rename from tests/Messages/CreditCard/Mock/AuthorizeResponseSuccess.txt rename to tests/Mock/CreditCard/AuthorizeResponseSuccess.txt diff --git a/tests/Messages/CreditCard/Mock/CaptureResponseSuccess.txt b/tests/Mock/CreditCard/CaptureResponseSuccess.txt similarity index 100% rename from tests/Messages/CreditCard/Mock/CaptureResponseSuccess.txt rename to tests/Mock/CreditCard/CaptureResponseSuccess.txt diff --git a/tests/Messages/CreditCard/Mock/CreateCardResponseSuccess.txt b/tests/Mock/CreditCard/CreateCardResponseSuccess.txt similarity index 100% rename from tests/Messages/CreditCard/Mock/CreateCardResponseSuccess.txt rename to tests/Mock/CreditCard/CreateCardResponseSuccess.txt diff --git a/tests/Messages/CreditCard/Mock/RefundResponseSuccess.txt b/tests/Mock/CreditCard/RefundResponseSuccess.txt similarity index 100% rename from tests/Messages/CreditCard/Mock/RefundResponseSuccess.txt rename to tests/Mock/CreditCard/RefundResponseSuccess.txt diff --git a/tests/Messages/CreditCard/Mock/ResponseFailed.txt b/tests/Mock/CreditCard/ResponseFailed.txt similarity index 100% rename from tests/Messages/CreditCard/Mock/ResponseFailed.txt rename to tests/Mock/CreditCard/ResponseFailed.txt diff --git a/tests/Messages/CreditCard/Mock/UpdateCardResponseSuccess.txt b/tests/Mock/CreditCard/UpdateCardResponseSuccess.txt similarity index 100% rename from tests/Messages/CreditCard/Mock/UpdateCardResponseSuccess.txt rename to tests/Mock/CreditCard/UpdateCardResponseSuccess.txt diff --git a/tests/Messages/CreditCard/Mock/VoidResponseSuccess.txt b/tests/Mock/CreditCard/VoidResponseSuccess.txt similarity index 100% rename from tests/Messages/CreditCard/Mock/VoidResponseSuccess.txt rename to tests/Mock/CreditCard/VoidResponseSuccess.txt