From 9a86b1668a54bc9b0dbe5bd97a336b12008db1f8 Mon Sep 17 00:00:00 2001 From: Aydin Hassan Date: Sun, 10 Mar 2024 14:03:05 +0100 Subject: [PATCH] Allow listeners added via config to be compiled in container by making them factories --- test/Factory/EventDispatcherFactoryTest.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/Factory/EventDispatcherFactoryTest.php b/test/Factory/EventDispatcherFactoryTest.php index f1086db8..f20bc1f7 100644 --- a/test/Factory/EventDispatcherFactoryTest.php +++ b/test/Factory/EventDispatcherFactoryTest.php @@ -129,7 +129,7 @@ public function testExceptionIsThrownIfEventsListenerContainerEntryNotExist(): v { $eventConfig = [ 'my-group' => [ - 'someEvent' => [containerListener('nonExistingContainerEntry')] + 'someEvent' => [containerListener('nonExistingContainerEntry')()] ] ]; @@ -274,7 +274,7 @@ public function testExceptionIsThrownIfMethodDoesNotExistOnContainerEntry(): voi { $eventConfig = [ 'my-group' => [ - 'someEvent' => [containerListener('containerEntry', 'notHere')] + 'someEvent' => [containerListener('containerEntry', 'notHere')()] ] ];