File tree Expand file tree Collapse file tree 1 file changed +4
-3
lines changed
dev/tests/integration/testsuite/Magento/Captcha/Observer Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -34,15 +34,16 @@ public function setUp()
34
34
/**
35
35
* @magentoDataFixture Magento/Captcha/_files/failed_logins_backend.php
36
36
*/
37
- public function testBackendLoginActionWithInvalidCaptchaReturnsError ()
37
+ public function testLoginAttemptsRemovedAfterSuccessfulLogin ()
38
38
{
39
+ $ login = 'mageadmin ' ;
39
40
$ userFactory = $ this ->objectManager ->get (UserFactory::class);
40
41
$ captchaLogFactory = $ this ->objectManager ->get (LogFactory::class);
41
42
$ eventManager = $ this ->objectManager ->get (ManagerInterface::class);
42
43
43
44
/** @var User $user */
44
45
$ user = $ userFactory ->create ();
45
- $ user ->setUserName (' mageadmin ' );
46
+ $ user ->setUserName ($ login );
46
47
47
48
$ eventManager ->dispatch (
48
49
'backend_auth_user_login_success ' ,
@@ -54,6 +55,6 @@ public function testBackendLoginActionWithInvalidCaptchaReturnsError()
54
55
*/
55
56
$ captchaLog = $ captchaLogFactory ->create ();
56
57
57
- self ::assertEquals (0 , $ captchaLog ->countAttemptsByUserLogin (' mageadmin ' ));
58
+ self ::assertEquals (0 , $ captchaLog ->countAttemptsByUserLogin ($ login ));
58
59
}
59
60
}
You can’t perform that action at this time.
0 commit comments