Magento 2 Documentation  2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
AssertUserSuccessLogin.php
Go to the documentation of this file.
1 <?php
8 
9 use Magento\Backend\Test\Page\Adminhtml\Dashboard;
11 use Magento\Mtf\Constraint\AbstractConstraint;
12 
16 class AssertUserSuccessLogin extends AbstractConstraint
17 {
25  public function processAssert(User $user, Dashboard $dashboard)
26  {
27  $this->objectManager->create(
28  \Magento\User\Test\TestStep\LoginUserOnBackendStep::class,
29  ['user' => $user]
30  )->run();
31  \PHPUnit\Framework\Assert::assertTrue(
32  $dashboard->getAdminPanelHeader()->isLoggedIn(),
33  'Admin user was not logged in.'
34  );
35  }
36 
42  public function toString()
43  {
44  return 'Admin user is logged in.';
45  }
46 }
$user
Definition: dummy_user.php:13