Skip to content

Commit

Permalink
removed unittest using removed ClassicCheckoutSDK
Browse files Browse the repository at this point in the history
  • Loading branch information
DjoykeAbyah committed Nov 18, 2024
1 parent 51307c5 commit 88c31a6
Showing 1 changed file with 0 additions and 46 deletions.
46 changes: 0 additions & 46 deletions tests/Unit/ModelBasedCheckoutTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
use Adyen\Model\Checkout\PaymentRequest;
use Adyen\Model\Checkout\PaymentSetupRequest;
use Adyen\Model\Checkout\PaymentVerificationRequest;
use Adyen\Service\Checkout\ClassicCheckoutSDKApi;
use Adyen\Service\Checkout\DonationsApi;
use Adyen\Service\Checkout\PaymentLinksApi;
use Adyen\Service\Checkout\PaymentsApi;
Expand Down Expand Up @@ -147,58 +146,13 @@ public static function successPaymentsDetailsProvider()
);
}

/**
* @dataProvider successPaymentSessionProvider
*/
public function testPaymentSessionSuccess($jsonFile, $httpStatus)
{
// create Checkout client
$client = $this->createMockClient($jsonFile, $httpStatus);

// initialize service
$service = new ClassicCheckoutSDKApi($client);

$params = array(
'merchant_account' => "YourMerchantAccount",
'amount' => array('currency' => "EUR", 'value' => 1000),
'country_code' => "NL",
'reference' => "Your order number",
'return_url' => self::RETURN_URL,
"sdk_version" => "1.3.0"
);

$result = $service->paymentSession(new PaymentSetupRequest($params));

$this->assertNotNull($result->getPaymentSession());
}

public static function successPaymentSessionProvider()
{
return array(
array('tests/Resources/ModelBasedCheckout/payment-session-success.json', 200)
);
}

/**
* @dataProvider successPaymentsResultProvider
*/
public function testPaymentsResultSuccess($jsonFile, $httpStatus)
{
// create Checkout client
$client = $this->createMockClient($jsonFile, $httpStatus);

// initialize service
$service = new ClassicCheckoutSDKApi($client);

$params = array(
'payload' => "YourPayload"
);

$result = $service->verifyPaymentResult(new PaymentVerificationRequest($params));

$this->assertContains($result->getResultCode(), array('Authorised'));
}

public static function successPaymentsResultProvider()
{
return array(
Expand Down

0 comments on commit 88c31a6

Please sign in to comment.