Skip to content

Commit 1cb0c2a

Browse files
committed
Fix LostController test
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
1 parent 71ee292 commit 1cb0c2a

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

tests/Core/Controller/LostControllerTest.php

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@
2626
use OC\Core\Events\BeforePasswordResetEvent;
2727
use OC\Core\Events\PasswordResetEvent;
2828
use OC\Mail\Message;
29+
use OC\Security\RateLimiting\Limiter;
2930
use OCP\AppFramework\Http\JSONResponse;
3031
use OCP\AppFramework\Http\TemplateResponse;
3132
use OCP\AppFramework\Services\IInitialState;
@@ -43,8 +44,8 @@
4344
use OCP\Mail\IMailer;
4445
use OCP\Security\VerificationToken\InvalidTokenException;
4546
use OCP\Security\VerificationToken\IVerificationToken;
46-
use Psr\Log\LoggerInterface;
4747
use PHPUnit\Framework\MockObject\MockObject;
48+
use Psr\Log\LoggerInterface;
4849
use 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

Comments
 (0)