2626use OC \Core \Events \BeforePasswordResetEvent ;
2727use OC \Core \Events \PasswordResetEvent ;
2828use OC \Mail \Message ;
29+ use OC \Security \RateLimiting \Limiter ;
2930use OCP \AppFramework \Http \JSONResponse ;
3031use OCP \AppFramework \Http \TemplateResponse ;
3132use OCP \AppFramework \Services \IInitialState ;
4344use OCP \Mail \IMailer ;
4445use OCP \Security \VerificationToken \InvalidTokenException ;
4546use OCP \Security \VerificationToken \IVerificationToken ;
46- use Psr \Log \LoggerInterface ;
4747use PHPUnit \Framework \MockObject \MockObject ;
48+ use Psr \Log \LoggerInterface ;
4849use Test \TestCase ;
4950
5051/**
@@ -82,6 +83,8 @@ class LostControllerTest extends TestCase {
8283 private $ verificationToken ;
8384 /** @var IEventDispatcher|MockObject */
8485 private $ eventDispatcher ;
86+ /** @var Limiter|MockObject */
87+ private $ limiter ;
8588
8689 protected function setUp (): void {
8790 parent ::setUp ();
@@ -129,6 +132,7 @@ protected function setUp(): void {
129132 $ this ->initialState = $ this ->createMock (IInitialState::class);
130133 $ this ->verificationToken = $ this ->createMock (IVerificationToken::class);
131134 $ this ->eventDispatcher = $ this ->createMock (IEventDispatcher::class);
135+ $ this ->limiter = $ this ->createMock (Limiter::class);
132136 $ this ->lostController = new LostController (
133137 'Core ' ,
134138 $ this ->request ,
@@ -144,7 +148,8 @@ protected function setUp(): void {
144148 $ this ->twofactorManager ,
145149 $ this ->initialState ,
146150 $ this ->verificationToken ,
147- $ this ->eventDispatcher
151+ $ this ->eventDispatcher ,
152+ $ this ->limiter
148153 );
149154 }
150155
0 commit comments