/**
* Tests for _getHtmlForServerEngine() method
*
* @return void
*/
public function testGetHtmlForServerEngine()
{
$_REQUEST['engine'] = "Pbxt";
$_REQUEST['page'] = "page";
//Mock DBI
$dbi = $this->getMockBuilder('PMA\\libraries\\DatabaseInterface')->disableOriginalConstructor()->getMock();
$GLOBALS['dbi'] = $dbi;
$class = new ReflectionClass('\\PMA\\libraries\\controllers\\server\\ServerEnginesController');
$method = $class->getMethod('_getHtmlForServerEngine');
$method->setAccessible(true);
$engine_plugin = StorageEngine::getEngine("Pbxt");
$ctrl = new ServerEnginesController();
$html = $method->invoke($ctrl, $engine_plugin);
//validate 1: Engine title
$this->assertContains(htmlspecialchars($engine_plugin->getTitle()), $html);
//validate 2: Engine Mysql Help Page
$this->assertContains(PMA\libraries\Util::showMySQLDocu($engine_plugin->getMysqlHelpPage()), $html);
//validate 3: Engine Comment
$this->assertContains(htmlspecialchars($engine_plugin->getComment()), $html);
//validate 4: Engine Info Pages
$this->assertContains(__('Variables'), $html);
$this->assertContains(URL::getCommon(array('engine' => $_REQUEST['engine'], 'page' => "Documentation")), $html);
//validate 5: other items
$this->assertContains(URL::getCommon(array('engine' => $_REQUEST['engine'])), $html);
$this->assertContains($engine_plugin->getSupportInformationMessage(), $html);
$this->assertContains('There is no detailed status information available for this ' . 'storage engine.', $html);
}