Magento 2 Documentation  2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
LockAdminUserEntityTest.php
Go to the documentation of this file.
1 <?php
8 
11 use Magento\Mtf\Fixture\FixtureFactory;
12 use Magento\Mtf\TestCase\Injectable;
15 
31 class LockAdminUserEntityTest extends Injectable
32 {
33  /* tags */
34  const MVP = 'no';
35  /* end tags */
36 
49  public function testUpdateAdminUser(
51  User $customAdmin,
52  $incorrectPassword,
53  $attempts,
54  AdminAuthLogin $adminAuth,
55  FixtureFactory $fixtureFactory,
56  AssertUserFailedLoginMessage $assertUserFailedLoginMessage
57  ) {
58  // Preconditions
59  $config->persist();
60  $customAdmin->persist();
62  $incorrectUser = $fixtureFactory->createByCode(
63  'user',
64  ['data' => ['username' => $customAdmin->getUsername(), 'password' => $incorrectPassword]]
65  );
66 
67  // Steps and assertions
68  for ($i = 0; $i < $attempts; $i++) {
69  $assertUserFailedLoginMessage->processAssert($adminAuth, $incorrectUser);
70  }
71  }
72 }
$config
Definition: fraud_order.php:17
processAssert(AdminAuthLogin $adminAuth, User $customAdmin)
$i
Definition: gallery.phtml:31