Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Fix LostController test
Signed-off-by: Côme Chilliet <[email protected]>
  • Loading branch information
come-nc committed Oct 18, 2022
commit 1cb0c2ac52bb6dd05a8e822647b0b2e07c857697
9 changes: 7 additions & 2 deletions tests/Core/Controller/LostControllerTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
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;
Expand All @@ -43,8 +44,8 @@
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;

/**
Expand Down Expand Up @@ -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();
Expand Down Expand Up @@ -129,6 +132,7 @@ protected function setUp(): void {
$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,
Expand All @@ -144,7 +148,8 @@ protected function setUp(): void {
$this->twofactorManager,
$this->initialState,
$this->verificationToken,
$this->eventDispatcher
$this->eventDispatcher,
$this->limiter
);
}

Expand Down