Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/server.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorkesselb <mail@danielkesselberg.de>2021-03-31 00:13:36 +0300
committerGitHub <noreply@github.com>2021-03-31 00:13:36 +0300
commit2212a67fbca5b61b69728f34fdc09d0bd0b22036 (patch)
tree12ec83d243e2ebbf670de6c18860e51ba25ea852 /tests
parentf3738eeff70ead6657149fa5d25bfde04f731746 (diff)
parent3c5cf825b396eacdc3e2376137e010552796119e (diff)
Merge pull request #25961 from nextcloud/enh/events/2fa_provider
Add real events for enabled 2fa providers for users
Diffstat (limited to 'tests')
-rw-r--r--tests/lib/Authentication/TwoFactorAuth/ManagerTest.php7
1 files changed, 7 insertions, 0 deletions
diff --git a/tests/lib/Authentication/TwoFactorAuth/ManagerTest.php b/tests/lib/Authentication/TwoFactorAuth/ManagerTest.php
index a04e0f05f9d..fc921b8016b 100644
--- a/tests/lib/Authentication/TwoFactorAuth/ManagerTest.php
+++ b/tests/lib/Authentication/TwoFactorAuth/ManagerTest.php
@@ -33,6 +33,7 @@ use OCP\AppFramework\Utility\ITimeFactory;
use OCP\Authentication\TwoFactorAuth\IActivatableAtLogin;
use OCP\Authentication\TwoFactorAuth\IProvider;
use OCP\Authentication\TwoFactorAuth\IRegistry;
+use OCP\EventDispatcher\IEventDispatcher;
use OCP\IConfig;
use OCP\ISession;
use OCP\IUser;
@@ -83,6 +84,9 @@ class ManagerTest extends TestCase {
/** @var ITimeFactory|MockObject */
private $timeFactory;
+ /** @var IEventDispatcher|MockObject */
+ private $newDispatcher;
+
/** @var EventDispatcherInterface|MockObject */
private $eventDispatcher;
@@ -99,6 +103,7 @@ class ManagerTest extends TestCase {
$this->logger = $this->createMock(LoggerInterface::class);
$this->tokenProvider = $this->createMock(TokenProvider::class);
$this->timeFactory = $this->createMock(ITimeFactory::class);
+ $this->newDispatcher = $this->createMock(IEventDispatcher::class);
$this->eventDispatcher = $this->createMock(EventDispatcherInterface::class);
$this->manager = new Manager(
@@ -111,6 +116,7 @@ class ManagerTest extends TestCase {
$this->logger,
$this->tokenProvider,
$this->timeFactory,
+ $this->newDispatcher,
$this->eventDispatcher
);
@@ -529,6 +535,7 @@ class ManagerTest extends TestCase {
$this->logger,
$this->tokenProvider,
$this->timeFactory,
+ $this->newDispatcher,
$this->eventDispatcher
])
->setMethods(['loadTwoFactorApp', 'isTwoFactorAuthenticated'])// Do not actually load the apps