Ejemplo n.º 1
0
 /**
  * Test the countEvents method.
  *
  * @return  void
  *
  * @covers  Joomla\Event\Dispatcher::countEvents
  * @since   1.0
  */
 public function testCountEvents()
 {
     $this->assertEquals(0, $this->instance->countEvents());
     $event1 = new Event('onBeforeTest');
     $event2 = new Event('onTest');
     $event3 = new Event('onAfterTest');
     $this->instance->addEvent($event1)->addEvent($event2)->addEvent($event3);
     $this->assertEquals(3, $this->instance->countEvents());
 }