summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorRoeland Jago Douma <rullzer@users.noreply.github.com>2019-01-29 19:50:15 +0100
committerGitHub <noreply@github.com>2019-01-29 19:50:15 +0100
commitdeb7d2364f38ce24bee62cd490fccfd6e4d3f059 (patch)
tree4c089bbc0adce35d42e53b06c3da74632718a371 /tests
parent050b9135d50f57c777c157bb7aa8c102524b2c77 (diff)
parentac8a6e22448cd4077e73b68731764bd60775665a (diff)
downloadnextcloud-server-deb7d2364f38ce24bee62cd490fccfd6e4d3f059.tar.gz
nextcloud-server-deb7d2364f38ce24bee62cd490fccfd6e4d3f059.zip
Merge pull request #13869 from nextcloud/enh/clean_pending_2fa_session_on_password_change
Clean pending 2FA authentication on password reset
Diffstat (limited to 'tests')
-rw-r--r--tests/Core/Controller/LostControllerTest.php7
1 files changed, 6 insertions, 1 deletions
diff --git a/tests/Core/Controller/LostControllerTest.php b/tests/Core/Controller/LostControllerTest.php
index 2aa10cf1165..8635616a9d5 100644
--- a/tests/Core/Controller/LostControllerTest.php
+++ b/tests/Core/Controller/LostControllerTest.php
@@ -21,6 +21,7 @@
namespace Tests\Core\Controller;
+use OC\Authentication\TwoFactorAuth\Manager;
use OC\Core\Controller\LostController;
use OC\Mail\Message;
use OCP\AppFramework\Http\JSONResponse;
@@ -77,6 +78,8 @@ class LostControllerTest extends \Test\TestCase {
private $crypto;
/** @var ILogger|\PHPUnit_Framework_MockObject_MockObject */
private $logger;
+ /** @var Manager|\PHPUnit_Framework_MockObject_MockObject */
+ private $twofactorManager;
protected function setUp() {
parent::setUp();
@@ -128,6 +131,7 @@ class LostControllerTest extends \Test\TestCase {
->willReturn(true);
$this->crypto = $this->createMock(ICrypto::class);
$this->logger = $this->createMock(ILogger::class);
+ $this->twofactorManager = $this->createMock(Manager::class);
$this->lostController = new LostController(
'Core',
$this->request,
@@ -142,7 +146,8 @@ class LostControllerTest extends \Test\TestCase {
$this->mailer,
$this->timeFactory,
$this->crypto,
- $this->logger
+ $this->logger,
+ $this->twofactorManager
);
}