Skip to content

Commit

Permalink
Hotfix: fix failing tests due to changed URL
Browse files Browse the repository at this point in the history
  • Loading branch information
f3l1x committed May 23, 2017
1 parent b9c74e5 commit 344e58c
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 6 deletions.
5 changes: 3 additions & 2 deletions tests/cases/unit/Service/PaymentServiceTest.phpt
Expand Up @@ -8,6 +8,7 @@

namespace Tests\Unit\Service;

use Markette\Gopay\Api\GopayConfig;
use Markette\Gopay\Entity\Payment;
use Markette\Gopay\Entity\ReturnedPayment;
use Markette\Gopay\Exception\GopayException;
Expand Down Expand Up @@ -42,7 +43,7 @@ class PaymentServiceTest extends BasePaymentTestCase

Assert::type(RedirectResponse::class, $response);
Assert::same(
'https://testgw.gopay.cz/gw/pay-full-v2?sessionInfo.targetGoId=1234567890&sessionInfo.paymentSessionId=3000000001&sessionInfo.encryptedSignature=999c4a90f42af5bdd9b5b7eaff43f27eb671b03a1efd4662b729dd21b9be41c22d5b25fe5955ff8d',
GopayConfig::TEST_URL . 'gw/pay-full-v2?sessionInfo.targetGoId=1234567890&sessionInfo.paymentSessionId=3000000001&sessionInfo.encryptedSignature=999c4a90f42af5bdd9b5b7eaff43f27eb671b03a1efd4662b729dd21b9be41c22d5b25fe5955ff8d',
$response->getUrl()
);
Assert::same(302, $response->getCode());
Expand All @@ -65,7 +66,7 @@ class PaymentServiceTest extends BasePaymentTestCase
Assert::type('array', $response);
Assert::count(2, $response);
Assert::same(
'https://testgw.gopay.cz/gw/v3/3000000001',
GopayConfig::TEST_URL . 'gw/v3/3000000001',
$response['url']
);

Expand Down
5 changes: 3 additions & 2 deletions tests/cases/unit/Service/PreAuthorizedPaymentServiceTest.phpt
Expand Up @@ -8,6 +8,7 @@

namespace Tests\Unit\Service;

use Markette\Gopay\Api\GopayConfig;
use Markette\Gopay\Entity\PreAuthorizedPayment;
use Markette\Gopay\Exception\GopayException;
use Markette\Gopay\Gopay;
Expand Down Expand Up @@ -39,7 +40,7 @@ class PreAuthorizedPaymentServiceTest extends BasePaymentTestCase

Assert::type(RedirectResponse::class, $response);
Assert::same(
'https://testgw.gopay.cz/gw/pay-full-v2?sessionInfo.targetGoId=1234567890&sessionInfo.paymentSessionId=3000000001&sessionInfo.encryptedSignature=999c4a90f42af5bdd9b5b7eaff43f27eb671b03a1efd4662b729dd21b9be41c22d5b25fe5955ff8d',
GopayConfig::TEST_URL . 'gw/pay-full-v2?sessionInfo.targetGoId=1234567890&sessionInfo.paymentSessionId=3000000001&sessionInfo.encryptedSignature=999c4a90f42af5bdd9b5b7eaff43f27eb671b03a1efd4662b729dd21b9be41c22d5b25fe5955ff8d',
$response->getUrl()
);
Assert::same(302, $response->getCode());
Expand All @@ -63,7 +64,7 @@ class PreAuthorizedPaymentServiceTest extends BasePaymentTestCase
Assert::type('array', $response);
Assert::count(2, $response);
Assert::same(
'https://testgw.gopay.cz/gw/v3/3000000001',
GopayConfig::TEST_URL . 'gw/v3/3000000001',
$response['url']
);

Expand Down
5 changes: 3 additions & 2 deletions tests/cases/unit/Service/RecurrentPaymentServiceTest.phpt
Expand Up @@ -8,6 +8,7 @@

namespace Tests\Unit\Service;

use Markette\Gopay\Api\GopayConfig;
use Markette\Gopay\Entity\RecurrentPayment;
use Markette\Gopay\Exception\GopayException;
use Markette\Gopay\Gopay;
Expand Down Expand Up @@ -45,7 +46,7 @@ class RecurrentPaymentServiceTest extends BasePaymentTestCase

Assert::type(RedirectResponse::class, $response);
Assert::same(
'https://testgw.gopay.cz/gw/pay-full-v2?sessionInfo.targetGoId=1234567890&sessionInfo.paymentSessionId=3000000001&sessionInfo.encryptedSignature=999c4a90f42af5bdd9b5b7eaff43f27eb671b03a1efd4662b729dd21b9be41c22d5b25fe5955ff8d',
GopayConfig::TEST_URL . 'gw/pay-full-v2?sessionInfo.targetGoId=1234567890&sessionInfo.paymentSessionId=3000000001&sessionInfo.encryptedSignature=999c4a90f42af5bdd9b5b7eaff43f27eb671b03a1efd4662b729dd21b9be41c22d5b25fe5955ff8d',
$response->getUrl()
);
Assert::same(302, $response->getCode());
Expand Down Expand Up @@ -75,7 +76,7 @@ class RecurrentPaymentServiceTest extends BasePaymentTestCase
Assert::type('array', $response);
Assert::count(2, $response);
Assert::same(
'https://testgw.gopay.cz/gw/v3/3000000001',
GopayConfig::TEST_URL . 'gw/v3/3000000001',
$response['url']
);

Expand Down

0 comments on commit 344e58c

Please sign in to comment.