Magento 2 Documentation  2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
AssertAccessTokensErrorRevokeMessage.php
Go to the documentation of this file.
1 <?php
8 
9 use Magento\User\Test\Page\Adminhtml\UserEdit;
10 use Magento\Mtf\Constraint\AbstractConstraint;
11 
16 class AssertAccessTokensErrorRevokeMessage extends AbstractConstraint
17 {
21  const ERROR_MESSAGE = 'This user has no tokens.';
22 
29  public function processAssert(UserEdit $userEdit)
30  {
31  \PHPUnit\Framework\Assert::assertEquals(
32  self::ERROR_MESSAGE,
33  $userEdit->getMessagesBlock()->getErrorMessage()
34  );
35  }
36 
42  public function toString()
43  {
44  return self::ERROR_MESSAGE . ' error message is present on UserEdit page.';
45  }
46 }