Skip to content

Commit fe3564f

Browse files
committed
Minor improvements
1 parent c873f14 commit fe3564f

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

dev/tests/integration/testsuite/Magento/Captcha/Observer/ResetAttemptForBackendObserverTest.php

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,15 +34,16 @@ public function setUp()
3434
/**
3535
* @magentoDataFixture Magento/Captcha/_files/failed_logins_backend.php
3636
*/
37-
public function testBackendLoginActionWithInvalidCaptchaReturnsError()
37+
public function testLoginAttemptsRemovedAfterSuccessfulLogin()
3838
{
39+
$login = 'mageadmin';
3940
$userFactory = $this->objectManager->get(UserFactory::class);
4041
$captchaLogFactory = $this->objectManager->get(LogFactory::class);
4142
$eventManager = $this->objectManager->get(ManagerInterface::class);
4243

4344
/** @var User $user */
4445
$user = $userFactory->create();
45-
$user->setUserName('mageadmin');
46+
$user->setUserName($login);
4647

4748
$eventManager->dispatch(
4849
'backend_auth_user_login_success',
@@ -54,6 +55,6 @@ public function testBackendLoginActionWithInvalidCaptchaReturnsError()
5455
*/
5556
$captchaLog = $captchaLogFactory->create();
5657

57-
self::assertEquals(0, $captchaLog->countAttemptsByUserLogin('mageadmin'));
58+
self::assertEquals(0, $captchaLog->countAttemptsByUserLogin($login));
5859
}
5960
}

0 commit comments

Comments
 (0)