Magento 2 Documentation  2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
AssertOrderMassOnHoldSuccessMessage.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 AssertOrderMassOnHoldSuccessMessage extends AbstractConstraint
17 {
18  /* tags */
19  const SEVERITY = 'low';
20  /* end tags */
21 
25  const SUCCESS_ON_HOLD_MESSAGE = 'You have put %d order(s) on hold.';
26 
34  public function processAssert(OrderIndex $orderIndex, $ordersCount)
35  {
36  \PHPUnit\Framework\Assert::assertEquals(
37  sprintf(self::SUCCESS_ON_HOLD_MESSAGE, $ordersCount),
38  $orderIndex->getMessagesBlock()->getSuccessMessage()
39  );
40  }
41 
47  public function toString()
48  {
49  return 'On hold success message is displayed on order index page.';
50  }
51 }