/**
  * Method to test registerListeners().
  *
  * @return void
  *
  * @covers Windwalker\Event\ListenerHelper::registerListeners
  */
 public function testRegisterListeners()
 {
     $dispatcher = $this->getMockBuilder('JEventDispatcher')->disableOriginalConstructor()->setMethods(array('attach'))->getMock();
     // "EventStub\Listener\Bar\FooListener" will not be loaded
     $dispatcher->expects($this->exactly(4))->method('attach');
     ListenerHelper::registerListeners('EventStub', $dispatcher, __DIR__ . '/EventStub/Listener');
 }
예제 #2
0
 /**
  * Register EventListeners.
  *
  * @return  void
  */
 protected function registerEventListener()
 {
     ListenerHelper::registerListeners(ucfirst($this->name), $this->container->get('event.dispatcher'), $this->path['administrator'] . '/src/' . ucfirst($this->name) . '/Listener');
 }