Beispiel #1
0
 public function testListeners()
 {
     $listener = new ListenerChain(array($this->getMock('Buzz\\Listener\\ListenerInterface')));
     $this->assertEquals(1, count($listener->getListeners()));
     $listener->addListener($this->getMock('Buzz\\Listener\\ListenerInterface'));
     $this->assertEquals(2, count($listener->getListeners()));
 }
 /**
  * {@inheritDoc}
  */
 public function addListener(ListenerInterface $listener)
 {
     parent::addListener($listener);
     if ($listener instanceof BatchListener) {
         $this->batchListeners[] = $listener;
     }
     if ($listener instanceof MultiCurlListener) {
         $this->multiCurlListeners[] = $listener;
     }
 }