2424use OC \Authentication \TwoFactorAuth \Manager ;
2525use OC \Core \Controller \LostController ;
2626use OC \Mail \Message ;
27+ use OC \Security \RateLimiting \Limiter ;
2728use OCP \AppFramework \Http \JSONResponse ;
2829use OCP \AppFramework \Http \TemplateResponse ;
2930use OCP \Defaults ;
4142use OCP \Mail \IMailer ;
4243use OCP \Security \VerificationToken \InvalidTokenException ;
4344use OCP \Security \VerificationToken \IVerificationToken ;
45+ use PHPUnit \Framework \MockObject \MockObject ;
4446
4547/**
4648 * Class LostControllerTest
@@ -77,6 +79,8 @@ class LostControllerTest extends \Test\TestCase {
7779 private $ initialStateService ;
7880 /** @var IVerificationToken|\PHPUnit\Framework\MockObject\MockObject */
7981 private $ verificationToken ;
82+ /** @var Limiter|MockObject */
83+ private $ limiter ;
8084
8185 protected function setUp (): void {
8286 parent ::setUp ();
@@ -129,6 +133,7 @@ protected function setUp(): void {
129133 $ this ->twofactorManager = $ this ->createMock (Manager::class);
130134 $ this ->initialStateService = $ this ->createMock (IInitialStateService::class);
131135 $ this ->verificationToken = $ this ->createMock (IVerificationToken::class);
136+ $ this ->limiter = $ this ->createMock (Limiter::class);
132137 $ this ->lostController = new LostController (
133138 'Core ' ,
134139 $ this ->request ,
@@ -143,7 +148,8 @@ protected function setUp(): void {
143148 $ this ->logger ,
144149 $ this ->twofactorManager ,
145150 $ this ->initialStateService ,
146- $ this ->verificationToken
151+ $ this ->verificationToken ,
152+ $ this ->limiter
147153 );
148154 }
149155
0 commit comments