Magento 2 Documentation  2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
AssertStoreDisabledErrorSaveMessage.php
Go to the documentation of this file.
1 <?php
8 
9 use Magento\Backend\Test\Page\Adminhtml\EditStore;
10 use Magento\Mtf\Constraint\AbstractConstraint;
11 
15 class AssertStoreDisabledErrorSaveMessage extends AbstractConstraint
16 {
20  const ERROR_MESSAGE = 'The default store cannot be disabled';
21 
28  public function processAssert(EditStore $editStore)
29  {
30  \PHPUnit\Framework\Assert::assertEquals(
31  self::ERROR_MESSAGE,
32  $editStore->getMessagesBlock()->getErrorMessage(),
33  'Wrong error message is displayed.'
34  );
35  }
36 
42  public function toString()
43  {
44  return 'Store View disabled error create message is present.';
45  }
46 }