Magento 2 Documentation  2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
AssertOrderStatusNotAssigned.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\Constraint\AbstractConstraint;
12 
17 class AssertOrderStatusNotAssigned extends AbstractConstraint
18 {
19  /* tags */
20  const SEVERITY = 'low';
21  /* end tags */
22 
30  public function processAssert(OrderStatus $orderStatus, OrderStatusIndex $orderStatusIndex)
31  {
32  $statusLabel = $orderStatus->getLabel();
33  \PHPUnit\Framework\Assert::assertFalse(
34  $orderStatusIndex->open()->getOrderStatusGrid()->isRowVisible(
35  ['label' => $statusLabel, 'state' => $orderStatus->getState()]
36  ),
37  "Order status $statusLabel is assigned to state."
38  );
39  }
40 
46  public function toString()
47  {
48  return 'Order status with status code from fixture have empty "State Code and Title" value.';
49  }
50 }
$orderStatus
Definition: order_status.php:9
processAssert(OrderStatus $orderStatus, OrderStatusIndex $orderStatusIndex)