Exemplo n.º 1
0
 /**
  * @covers \thebuggenie\core\framework\Event::listen
  * @covers \thebuggenie\core\framework\Event::isAnyoneListening
  * @covers \thebuggenie\core\framework\Event::clearListeners
  * @depends testCreateNew
  */
 public function testListening(\thebuggenie\core\framework\Event $event)
 {
     \thebuggenie\core\framework\Event::listen('modulename', 'identifier', array($this, 'listenerCallback'));
     $this->assertTrue(\thebuggenie\core\framework\Event::isAnyoneListening('modulename', 'identifier'));
     \thebuggenie\core\framework\Event::clearListeners('modulename', 'identifier');
     $this->assertFalse(\thebuggenie\core\framework\Event::isAnyoneListening('modulename', 'identifier'));
     \thebuggenie\core\framework\Event::listen('modulename', 'identifier', array($this, 'listenerCallbackNonProcessingFirst'));
     \thebuggenie\core\framework\Event::listen('modulename', 'identifier', array($this, 'listenerCallbackNonProcessingSecond'));
     \thebuggenie\core\framework\Event::listen('modulename', 'identifier', array($this, 'listenerCallbackProcessing'));
     $this->assertTrue(\thebuggenie\core\framework\Event::isAnyoneListening('modulename', 'identifier'));
     return $event;
 }