コード例 #1
0
 /**
  * Tests the JWeb::triggerEvents method.
  *
  * @return  void
  *
  * @since   11.3
  */
 public function testTriggerEvents()
 {
     $this->inspector->setClassProperty('dispatcher', null);
     $this->assertThat($this->inspector->triggerEvent('onJWebTriggerEvent'), $this->isNull(), 'Checks that for a non-dispatcher object, null is returned.');
     $this->inspector->setClassProperty('dispatcher', $this->getMockDispatcher());
     $this->inspector->registerEvent('onJWebTriggerEvent', 'function');
     $this->assertThat($this->inspector->triggerEvent('onJWebTriggerEvent'), $this->equalTo(array('function' => null)), 'Checks the correct dispatcher method is called.');
 }
コード例 #2
0
 /**
  * Method for setting protected static $instance.
  *
  * @param   mixed  $value  The value of the property.
  *
  * @return  void.
  *
  * @since   11.3
  */
 public function setClassInstance($value)
 {
     self::$instance = $value;
 }