dummyDbi = $this->createDbiDummy(); $this->dbi = $this->createDatabaseInterface($this->dummyDbi); DatabaseInterface::$instance = $this->dbi; $GLOBALS['text_dir'] = 'ltr'; $GLOBALS['server'] = 1; $GLOBALS['db'] = 'db'; $GLOBALS['table'] = 'table'; $config = Config::getInstance(); $config->selectedServer['DisableIS'] = false; $config->selectedServer['host'] = 'localhost'; $this->data = new Data($this->dbi, $config); } public function testIndex(): void { $response = new ResponseRenderer(); $controller = new VariablesController($response, new Template(), $this->data, DatabaseInterface::getInstance()); $this->dummyDbi->addSelectDb('mysql'); $controller($this->createStub(ServerRequest::class)); $this->dummyDbi->assertAllSelectsConsumed(); $html = $response->getHTMLResult(); $this->assertStringContainsString('
', $html); $this->assertStringContainsString('index.php?route=/server/status/variables', $html); $this->assertStringContainsString( '', $html, ); $this->assertStringContainsString('