Magento 2 Documentation  2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
VoidAuthorizationStep.php
Go to the documentation of this file.
1 <?php
8 
10 use Magento\Sales\Test\Page\Adminhtml\OrderIndex;
11 use Magento\Mtf\TestStep\TestStepInterface;
12 use Magento\Sales\Test\Page\Adminhtml\SalesOrderView;
13 
17 class VoidAuthorizationStep implements TestStepInterface
18 {
24  protected $orderIndex;
25 
31  protected $order;
32 
38  private $salesOrderView;
39 
45  public function __construct(OrderInjectable $order, OrderIndex $orderIndex, SalesOrderView $salesOrderView)
46  {
47  $this->orderIndex = $orderIndex;
48  $this->order = $order;
49  $this->salesOrderView = $salesOrderView;
50  }
51 
57  public function run()
58  {
59  $this->orderIndex->open();
60  $this->orderIndex->getSalesOrderGrid()->searchAndOpen(['id' => $this->order->getId()]);
61  $this->salesOrderView->getPageActions()->void();
62  }
63 }
__construct(OrderInjectable $order, OrderIndex $orderIndex, SalesOrderView $salesOrderView)