Skip to content

Commit

Permalink
unit test for double path param substitution
Browse files Browse the repository at this point in the history
  • Loading branch information
jillingk committed Jul 10, 2023
1 parent 3146822 commit 93ffaa2
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions tests/Unit/CheckoutTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@

use Adyen\AdyenException;
use Adyen\Service\Checkout;
use function PHPUnit\Framework\assertContains;
use function PHPUnit\Framework\assertEquals;

class CheckoutTest extends TestCaseMock
{
Expand Down Expand Up @@ -583,4 +585,13 @@ public static function successDeleteStoredPaymentMethodsProvider()
array('tests/Resources/Checkout/deleteStoredPaymentMethods-success.json', 200),
);
}

public function testDoublePathParamSubstitution()
{
$client = $this->createMockClientUrl('tests/Resources/ModelBasedCheckout/sessions-success.json');
$resource = new Checkout($client);
$resource->captures(array('paymentPspReference' => 'pspRef1'));
$resource->captures(array('paymentPspReference' => 'pspRef2'));
assertEquals($this->requestUrl, 'https://checkout-test.adyen.com/v70/payments/pspRef2/captures');
}
}

0 comments on commit 93ffaa2

Please sign in to comment.