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