Magento 2 Documentation  2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
AssertOrderCancelMassActionPartialFailMessage.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 AssertOrderCancelMassActionPartialFailMessage extends AbstractConstraint
17 {
21  const FAIL_CANCEL_MESSAGE = 'You cannot cancel the order(s).';
22 
29  public function processAssert(OrderIndex $orderIndex)
30  {
31  \PHPUnit\Framework\Assert::assertEquals(
32  self::FAIL_CANCEL_MESSAGE,
33  $orderIndex->getMessagesBlock()->getErrorMessage()
34  );
35  }
36 
42  public function toString()
43  {
44  return 'Cancel fail message is displayed on order index page.';
45  }
46 }