示例#1
0
 /**
  * Tests the JWeb::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.');
 }