Magento 2 Documentation  2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
AssertExportNoDataErrorMessage.php
Go to the documentation of this file.
1 <?php
7 
8 use Magento\ImportExport\Test\Page\Adminhtml\AdminExportIndex;
9 use Magento\Mtf\Constraint\AbstractConstraint;
10 
14 class AssertExportNoDataErrorMessage extends AbstractConstraint
15 {
19  const ERROR_MESSAGE = 'There is no data for the export.';
20 
27  public function processAssert(AdminExportIndex $adminExportIndex)
28  {
29  $actualMessage = $adminExportIndex->getMessagesBlock()->getErrorMessage();
30 
31  \PHPUnit\Framework\Assert::assertEquals(
32  self::ERROR_MESSAGE,
33  $actualMessage,
34  'Wrong error message is displayed.'
35  . "\nExpected: " . self::ERROR_MESSAGE
36  . "\nActual: " . $actualMessage
37  );
38  }
39 
45  public function toString()
46  {
47  return 'Correct error message is displayed.';
48  }
49 }