Magento 2 Documentation  2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
AssertOrderOnHoldFailMessage.php
Go to the documentation of this file.
1 <?php
8 
9 use Magento\Sales\Test\Page\Adminhtml\OrderIndex;
10 use Magento\Mtf\Constraint\AbstractConstraint;
11 
16 class AssertOrderOnHoldFailMessage extends AbstractConstraint
17 {
21  const FAIL_ON_HOLD_MESSAGE = 'No order(s) were put on hold.';
22 
29  public function processAssert(OrderIndex $orderIndex)
30  {
31  \PHPUnit\Framework\Assert::assertEquals(
32  self::FAIL_ON_HOLD_MESSAGE,
33  $orderIndex->getMessagesBlock()->getErrorMessage()
34  );
35  }
36 
42  public function toString()
43  {
44  return 'On hold fail message is displayed on order index page.';
45  }
46 }