diff options
author | kesselb <mail@danielkesselberg.de> | 2021-03-30 23:13:36 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-03-30 23:13:36 +0200 |
commit | 2212a67fbca5b61b69728f34fdc09d0bd0b22036 (patch) | |
tree | 12ec83d243e2ebbf670de6c18860e51ba25ea852 /tests | |
parent | f3738eeff70ead6657149fa5d25bfde04f731746 (diff) | |
parent | 3c5cf825b396eacdc3e2376137e010552796119e (diff) | |
download | nextcloud-server-2212a67fbca5b61b69728f34fdc09d0bd0b22036.tar.gz nextcloud-server-2212a67fbca5b61b69728f34fdc09d0bd0b22036.zip |
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.php | 7 |
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 |