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