/** * {@inheritdoc} */ public function hasListeners($eventName = null) { return $this->_wrappedDispatcher->hasListeners($eventName); }
public function testRemoveBeforeDispatch() { $service = $this->getMock('Symfony\\Component\\EventDispatcher\\Tests\\Service'); $container = new Container(); $container->set('service.listener', $service); $dispatcher = new ContainerAwareEventDispatcher($container); $dispatcher->addListenerService('onEvent', array('service.listener', 'onEvent')); $dispatcher->removeListener('onEvent', array($container->get('service.listener'), 'onEvent')); $this->assertFalse($dispatcher->hasListeners('onEvent')); }
/** * {@inheritdoc} */ public function hasListeners($eventName = null) { return $this->originalDispatcher->hasListeners($eventName); }