Magento 2 Documentation  2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
AssertMassActionSuccessUpdateMessage.php
Go to the documentation of this file.
1 <?php
8 
10 use Magento\Customer\Test\Page\Adminhtml\CustomerIndex;
11 use Magento\Mtf\Constraint\AbstractConstraint;
12 
17 class AssertMassActionSuccessUpdateMessage extends AbstractConstraint
18 {
19  /* tags */
20  const SEVERITY = 'low';
21  /* end tags */
22 
26  const UPDATE_MESSAGE = 'A total of %d record(s) were updated.';
27 
35  public function processAssert(array $customers, CustomerIndex $pageCustomerIndex)
36  {
37  $actualMessage = $pageCustomerIndex->getMessagesBlock()->getSuccessMessage();
38  \PHPUnit\Framework\Assert::assertEquals(sprintf(self::UPDATE_MESSAGE, count($customers)), $actualMessage);
39  }
40 
46  public function toString()
47  {
48  return 'Assert that update message is displayed.';
49  }
50 }