removeEventSubscriber() public method

Removes an event subscriber from the dispatcher.
See also: EventDispatcherInterface::removeSubscriber()
public removeEventSubscriber ( Symfony\Component\EventDispatcher\EventSubscriberInterface $subscriber ) : static
$subscriber Symfony\Component\EventDispatcher\EventSubscriberInterface The subscriber to remove.
return static The current instance.
 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);
 }