Magento 2 Documentation  2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
CheckSaveCreditCardOptionStep.php
Go to the documentation of this file.
1 <?php
7 
8 use Magento\Checkout\Test\Page\CheckoutOnepage;
9 use Magento\Mtf\TestStep\TestStepInterface;
11 
15 class CheckSaveCreditCardOptionStep implements TestStepInterface
16 {
22  private $checkoutOnepage;
23 
29  private $assertSaveCreditCardOptionNotPresent;
30 
36  private $payment;
37 
43  private $isVaultPresent;
44 
51  public function __construct(
52  CheckoutOnepage $checkoutOnepage,
53  AssertSaveCreditCardOptionNotPresent $assertSaveCreditCardOptionNotPresent,
54  array $payment,
55  $isVaultPresent = null
56  ) {
57  $this->checkoutOnepage = $checkoutOnepage;
58  $this->assertSaveCreditCardOptionNotPresent = $assertSaveCreditCardOptionNotPresent;
59  $this->payment = $payment;
60  $this->isVaultPresent = $isVaultPresent;
61  }
62 
68  public function run()
69  {
70  if ($this->isVaultPresent === false) {
71  $this->assertSaveCreditCardOptionNotPresent->processAssert(
72  $this->checkoutOnepage,
73  $this->payment['method']
74  );
75  }
76  }
77 }
$payment
Definition: order.php:17
__construct(CheckoutOnepage $checkoutOnepage, AssertSaveCreditCardOptionNotPresent $assertSaveCreditCardOptionNotPresent, array $payment, $isVaultPresent=null)