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;
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;
/**
private $verificationToken;
/** @var IEventDispatcher|MockObject */
private $eventDispatcher;
+ /** @var Limiter|MockObject */
+ private $limiter;
protected function setUp(): void {
parent::setUp();
$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,
$this->twofactorManager,
$this->initialState,
$this->verificationToken,
- $this->eventDispatcher
+ $this->eventDispatcher,
+ $this->limiter
);
}