aboutsummaryrefslogtreecommitdiffstats
path: root/tests/Core
diff options
context:
space:
mode:
authorCôme Chilliet <come.chilliet@nextcloud.com>2022-10-18 15:18:40 +0200
committerCôme Chilliet (Rebase PR Action) <come-nc@users.noreply.github.com>2022-10-18 14:49:02 +0000
commit1cb0c2ac52bb6dd05a8e822647b0b2e07c857697 (patch)
tree3361f9f82b8d19b0644e3db87d84dbccc07480f6 /tests/Core
parent71ee29265088462743f21381522f83a536250587 (diff)
downloadnextcloud-server-1cb0c2ac52bb6dd05a8e822647b0b2e07c857697.tar.gz
nextcloud-server-1cb0c2ac52bb6dd05a8e822647b0b2e07c857697.zip
Fix LostController test
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
Diffstat (limited to 'tests/Core')
-rw-r--r--tests/Core/Controller/LostControllerTest.php9
1 files changed, 7 insertions, 2 deletions
diff --git a/tests/Core/Controller/LostControllerTest.php b/tests/Core/Controller/LostControllerTest.php
index 31f2767ea4f..3f62c522627 100644
--- a/tests/Core/Controller/LostControllerTest.php
+++ b/tests/Core/Controller/LostControllerTest.php
@@ -26,6 +26,7 @@ use OC\Core\Controller\LostController;
use OC\Core\Events\BeforePasswordResetEvent;
use OC\Core\Events\PasswordResetEvent;
use OC\Mail\Message;
+use OC\Security\RateLimiting\Limiter;
use OCP\AppFramework\Http\JSONResponse;
use OCP\AppFramework\Http\TemplateResponse;
use OCP\AppFramework\Services\IInitialState;
@@ -43,8 +44,8 @@ use OCP\Mail\IEMailTemplate;
use OCP\Mail\IMailer;
use OCP\Security\VerificationToken\InvalidTokenException;
use OCP\Security\VerificationToken\IVerificationToken;
-use Psr\Log\LoggerInterface;
use PHPUnit\Framework\MockObject\MockObject;
+use Psr\Log\LoggerInterface;
use Test\TestCase;
/**
@@ -82,6 +83,8 @@ class LostControllerTest extends TestCase {
private $verificationToken;
/** @var IEventDispatcher|MockObject */
private $eventDispatcher;
+ /** @var Limiter|MockObject */
+ private $limiter;
protected function setUp(): void {
parent::setUp();
@@ -129,6 +132,7 @@ class LostControllerTest extends TestCase {
$this->initialState = $this->createMock(IInitialState::class);
$this->verificationToken = $this->createMock(IVerificationToken::class);
$this->eventDispatcher = $this->createMock(IEventDispatcher::class);
+ $this->limiter = $this->createMock(Limiter::class);
$this->lostController = new LostController(
'Core',
$this->request,
@@ -144,7 +148,8 @@ class LostControllerTest extends TestCase {
$this->twofactorManager,
$this->initialState,
$this->verificationToken,
- $this->eventDispatcher
+ $this->eventDispatcher,
+ $this->limiter
);
}