public function testGetListenersWhenAddedCallbackListenerIsRemoved()
 {
     $listener = function () {};
     $this->dispatcher->addListener('foo', $listener);
     $this->dispatcher->removeListener('foo', $listener);
     $this->assertSame(array(), $this->dispatcher->getListeners());
 }
예제 #2
0
 /**
  * {@inheritDoc}
  */
 public function removeListener(EventListener $listener)
 {
     $this->eventDispatcher->removeListener($listener);
     return $this;
 }
 public function off($event, $then)
 {
     $this->dispatcher->removeListener($event, $then);
 }