diff --git a/composer.json b/composer.json index beac114b..8678a8b5 100644 --- a/composer.json +++ b/composer.json @@ -43,7 +43,7 @@ "doctrine/cache": "^1.13.0 || ^2.1.0", "doctrine/collections": "^1.8.0 || ^2.1", "doctrine/doctrine-laminas-hydrator": "^3.2.0", - "doctrine/event-manager": "^1.2.0", + "doctrine/event-manager": "^1.2.0 || ^2.0", "doctrine/inflector": "^2.0.6", "doctrine/persistence": "^2.5.5 || ^3.1.0", "laminas/laminas-authentication": "^2.12.0", diff --git a/tests/Service/EventManagerFactoryTest.php b/tests/Service/EventManagerFactoryTest.php index 460a7f12..db403fb6 100644 --- a/tests/Service/EventManagerFactoryTest.php +++ b/tests/Service/EventManagerFactoryTest.php @@ -66,8 +66,6 @@ public function testWillAttachEventListenersFromConfiguredInstances(): void $eventManager = $factory->__invoke($serviceManager, EventManager::class); $this->assertInstanceOf(EventManager::class, $eventManager); - $listeners = $eventManager->getListeners(); - $this->assertArrayHasKey('dummy', $listeners); $listeners = $eventManager->getListeners('dummy'); $this->assertContains($subscriber, $listeners); } @@ -96,8 +94,6 @@ public function testWillAttachEventListenersFromServiceManagerAlias(): void $eventManager = $factory->__invoke($serviceManager, EventManager::class); $this->assertInstanceOf(EventManager::class, $eventManager); - $listeners = $eventManager->getListeners(); - $this->assertArrayHasKey('dummy', $listeners); $listeners = $eventManager->getListeners('dummy'); $this->assertContains($subscriber, $listeners); }