Ejemplo n.º 1
0
 /**
  * Tests the JApplicationWeb::loadDocument method.
  *
  * @return  void
  *
  * @since   11.3
  */
 public function testLoadDocument()
 {
     // Inject the mock dispatcher into the JEventDispatcher singleton.
     TestReflection::setValue('JEventDispatcher', 'instance', $this->getMockDispatcher());
     $this->class->loadDocument();
     $this->assertAttributeInstanceOf('JDocument', 'document', $this->class);
 }
Ejemplo n.º 2
0
 /**
  * Tests the JApplicationWeb::loadDocument method.
  *
  * @return  void
  *
  * @since   11.3
  */
 public function testLoadDocument()
 {
     // Inject the mock dispatcher into the JDispatcher singleton.
     JDispatcherInspector::setInstance($this->getMockDispatcher());
     $this->inspector->loadDocument();
     $this->assertInstanceOf('JDocument', $this->inspector->getClassProperty('document'), 'Tests that the document object is the correct class.');
     $this->assertThat($this->inspector->getClassProperty('document')->test(), $this->equalTo('ok'), 'Tests that we got the document from the factory.');
 }
Ejemplo n.º 3
0
 /**
  * Tests the JApplicationWeb::loadDocument method.
  *
  * @return  void
  *
  * @since   11.3
  */
 public function testLoadDocument()
 {
     // Inject the mock dispatcher into the JEventDispatcher singleton.
     TestReflection::setValue('JEventDispatcher', 'instance', $this->getMockDispatcher());
     $this->class->loadDocument();
     $this->assertInstanceOf('JDocument', TestReflection::getValue($this->class, 'document'), 'Tests that the document object is the correct class.');
     $this->assertThat(TestReflection::getValue($this->class, 'document')->test(), $this->equalTo('ok'), 'Tests that we got the document from the factory.');
 }
Ejemplo n.º 4
0
 /**
  * Tests the JApplicationWeb::loadDocument method.
  *
  * @return  void
  *
  * @since   11.3
  */
 public function testLoadDocument()
 {
     $this->class->loadDocument();
     $this->assertAttributeInstanceOf('JDocument', 'document', $this->class);
 }