/** * @param string $eventName * @param callable|ListenerInterface $listener * @throws Exception\AlreadySubscribedException * @throws InvalidListenerException */ public function registerListener($eventName, $listener) { $this->eventMap->addListener($eventName, $this->createListener($listener)); }
public function testSetDispatchedException() { $this->setExpectedException(NoSuchListenerException::class); $this->collection->addListener('null', $this->createListeners()); $this->collection->setDispatched('null', $this->createListeners()); }