$this->
assertSame($expectedListeners,
$actualListeners);
} /**
* Tests dispatching Symfony events with core's event dispatcher.
*/
public function testSymfonyEventDispatching() { $container =
new ContainerBuilder();
$dispatcher =
new ContainerAwareEventDispatcher($container,
[]);
$dispatcher->
dispatch(new GenericEvent());
} public function testDispatchWithServices() { $container =
new ContainerBuilder();
$container->
register('listener_service', TestEventListener::
class);
$listeners =
[ 'test_event' =>
[ 0 =>
[ ['service' =>
['listener_service', 'preFoo'
]],
],
],