Magento 2 Documentation  2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
UnassignCustomOrderStatusTest.php
Go to the documentation of this file.
1 <?php
8 
9 use Magento\Sales\Test\Fixture\OrderStatus;
10 use Magento\Sales\Test\Page\Adminhtml\OrderStatusIndex;
11 use Magento\Mtf\TestCase\Injectable;
12 
27 class UnassignCustomOrderStatusTest extends Injectable
28 {
29  /* tags */
30  const MVP = 'yes';
31  /* end tags */
32 
38  protected $orderStatusIndex;
39 
46  public function __inject(OrderStatusIndex $orderStatusIndex)
47  {
48  $this->orderStatusIndex = $orderStatusIndex;
49  }
50 
57  public function test(OrderStatus $orderStatus)
58  {
59  // Preconditions:
60  $orderStatus->persist();
61 
62  // Steps:
63  $orderStatusLabel = $orderStatus->getLabel();
64  $this->orderStatusIndex->open();
65  $this->orderStatusIndex->getOrderStatusGrid()->searchAndUnassign(['label' => $orderStatusLabel]);
66  }
67 }
$orderStatus
Definition: order_status.php:9