public function setEventDispatcher(EventDispatcherInterface $dispatcher = null) { $this->dispatcher = $dispatcher; return $this; }
public function testRemoveEventSubscriber() { $dispatcher = $this->getMock('Symfony\\Component\\EventDispatcher\\EventDispatcherInterface'); $subscriber = $this->getMock('Symfony\\Component\\EventDispatcher\\EventSubscriberInterface'); $dispatcher->expects($this->once())->method('removeSubscriber')->with($subscriber); $this->config->setEventDispatcher($dispatcher); $this->config->removeEventSubscriber($subscriber); }