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()
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}
You can’t perform that action at this time.
0 commit comments