public function testIndex() { // First set a test file ready Layout::setDirectory(dirname(__FILE__) . '/testIndex/'); // Perform and retrieve the output ob_start(); $this->controller->index(); Factory::getInstance()->output->_display(); $output = ob_get_contents(); ob_end_clean(); $this->assertEquals('Hello!', $output); }