dummyDbi = $this->createDbiDummy();
$this->dbi = $this->createDatabaseInterface($this->dummyDbi);
$GLOBALS['dbi'] = $this->dbi;
$GLOBALS['server'] = 1;
$GLOBALS['db'] = 'db';
$GLOBALS['table'] = 'table';
$GLOBALS['PMA_PHP_SELF'] = 'index.php';
$GLOBALS['cfg']['Server']['DisableIS'] = false;
$GLOBALS['cfg']['Server']['host'] = 'localhost';
$this->data = new Data($this->dbi);
}
public function testIndex(): void
{
$response = new ResponseRenderer();
$controller = new ProcessesController(
$response,
new Template(),
$this->data,
$GLOBALS['dbi'],
new Processes($GLOBALS['dbi'])
);
$this->dummyDbi->addSelectDb('mysql');
$controller($this->createStub(ServerRequest::class));
$this->dummyDbi->assertAllSelectsConsumed();
$html = $response->getHTMLResult();
$this->assertStringContainsString(
'Note: Enabling the auto refresh here might cause '
. 'heavy traffic between the web server and the MySQL server.',
$html
);
// Test tab links
$this->assertStringContainsString('