Magento 2 Documentation  2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
UseVaultPaymentTokenStep.php
Go to the documentation of this file.
1 <?php
7 
8 use Magento\Mtf\TestStep\TestStepInterface;
9 use Magento\Sales\Test\Page\Adminhtml\OrderCreateIndex;
10 
14 class UseVaultPaymentTokenStep implements TestStepInterface
15 {
19  private $orderCreatePage;
20 
24  private $vault;
25 
30  public function __construct(OrderCreateIndex $orderCreateIndex, array $vault)
31  {
32  $this->orderCreatePage = $orderCreateIndex;
33  $this->vault = $vault;
34  }
35 
39  public function run()
40  {
41  $block = $this->orderCreatePage->getCreateBlock();
42  $block->selectPaymentMethod($this->vault);
43  $block->selectVaultToken('token_switcher_' . $this->vault['method']);
44  }
45 }
$block
Definition: block.php:8
__construct(OrderCreateIndex $orderCreateIndex, array $vault)