Пример #1
0
 /**
  * Tests the JApplicationBase::loadDispatcher method.
  *
  * @return  void
  *
  * @since   12.1
  */
 public function testLoadDispatcher()
 {
     $this->class->loadDispatcher($this->getMockDispatcher());
     $this->assertAttributeInstanceOf('JEventDispatcher', 'dispatcher', $this->class, 'Tests that the dispatcher object is the correct class.');
     // Inject a mock value into the JEventDispatcher singleton.
     TestReflection::setValue('JEventDispatcher', 'instance', 'foo');
     $this->class->loadDispatcher();
     $this->assertEquals('foo', TestReflection::getValue($this->class, 'dispatcher'), 'Tests that we got the dispatcher from the factory.');
 }