aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorJoas Schilling <coding@schilljs.com>2023-07-25 11:54:36 +0200
committerJoas Schilling <coding@schilljs.com>2023-07-27 09:57:52 +0200
commitdac31ad1010924bc2067fbbdaf5c856639c71091 (patch)
tree25cf9a88696d00a6e8e76386f77ba73bf4ff7e72 /tests
parent1b387bb341d2ecf15b7cd3c946ceb9a33a984af7 (diff)
downloadnextcloud-server-dac31ad1010924bc2067fbbdaf5c856639c71091.tar.gz
nextcloud-server-dac31ad1010924bc2067fbbdaf5c856639c71091.zip
fix!: Remove legacy event dispatching Symfony's GenericEvent from 2FA Manager
Signed-off-by: Joas Schilling <coding@schilljs.com>
Diffstat (limited to 'tests')
-rw-r--r--tests/lib/Authentication/TwoFactorAuth/ManagerTest.php15
1 files changed, 4 insertions, 11 deletions
diff --git a/tests/lib/Authentication/TwoFactorAuth/ManagerTest.php b/tests/lib/Authentication/TwoFactorAuth/ManagerTest.php
index da11b11e537..7647e3bda7d 100644
--- a/tests/lib/Authentication/TwoFactorAuth/ManagerTest.php
+++ b/tests/lib/Authentication/TwoFactorAuth/ManagerTest.php
@@ -40,7 +40,6 @@ use OCP\IUser;
use PHPUnit\Framework\MockObject\MockObject;
use Psr\Log\LoggerInterface;
use function reset;
-use Symfony\Component\EventDispatcher\EventDispatcherInterface;
use Test\TestCase;
class ManagerTest extends TestCase {
@@ -84,10 +83,7 @@ class ManagerTest extends TestCase {
private $timeFactory;
/** @var IEventDispatcher|MockObject */
- private $newDispatcher;
-
- /** @var EventDispatcherInterface|MockObject */
- private $eventDispatcher;
+ private $dispatcher;
protected function setUp(): void {
parent::setUp();
@@ -102,8 +98,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->dispatcher = $this->createMock(IEventDispatcher::class);
$this->manager = new Manager(
$this->providerLoader,
@@ -115,8 +110,7 @@ class ManagerTest extends TestCase {
$this->logger,
$this->tokenProvider,
$this->timeFactory,
- $this->newDispatcher,
- $this->eventDispatcher
+ $this->dispatcher,
);
$this->fakeProvider = $this->createMock(IProvider::class);
@@ -530,8 +524,7 @@ class ManagerTest extends TestCase {
$this->logger,
$this->tokenProvider,
$this->timeFactory,
- $this->newDispatcher,
- $this->eventDispatcher
+ $this->dispatcher,
])
->setMethods(['loadTwoFactorApp', 'isTwoFactorAuthenticated'])// Do not actually load the apps
->getMock();