/** * Tests the JApplicationCms::Execute method with a document. * * @return void * * @since 3.2 */ public function testExecuteWithDocument() { $document = $this->getMockDocument(); $this->assignMockReturns($document, array('render' => 'JWeb Body')); // Manually inject the document. $this->class->loadDocument($document); // Buffer the execution. ob_start(); $this->class->execute(); $buffer = ob_get_contents(); ob_end_clean(); $this->assertEquals('JWeb Body', $this->class->getBody()); $this->assertEquals('JWeb Body', $buffer); }