Magento 2 Documentation  2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
AssertUserNotInGrid.php
Go to the documentation of this file.
1 <?php
8 
10 use Magento\User\Test\Page\Adminhtml\UserIndex;
11 use Magento\Mtf\Constraint\AbstractConstraint;
12 
16 class AssertUserNotInGrid extends AbstractConstraint
17 {
25  public function processAssert(
26  UserIndex $userIndex,
27  User $user
28  ) {
29  $filter = ['username' => $user->getUsername()];
30  $userIndex->open();
31  \PHPUnit\Framework\Assert::assertFalse(
32  $userIndex->getUserGrid()->isRowVisible($filter),
33  'User with name \'' . $user->getUsername() . '\' is present in Users grid.'
34  );
35  }
36 
42  public function toString()
43  {
44  return 'User is absent in Users grid.';
45  }
46 }
processAssert(UserIndex $userIndex, User $user)
$user
Definition: dummy_user.php:13