dummyDbi = $this->createDbiDummy(); $this->dbi = $this->createDatabaseInterface($this->dummyDbi); DatabaseInterface::$instance = $this->dbi; } public function testShowEngine(): void { $GLOBALS['server'] = 1; $GLOBALS['db'] = 'db'; $GLOBALS['table'] = 'table'; Config::getInstance()->selectedServer['DisableIS'] = false; $response = new ResponseRenderer(); $this->dummyDbi->addSelectDb('mysql'); $request = ServerRequestFactory::create()->createServerRequest('GET', 'http://example.com/') ->withAttribute('routeVars', ['engine' => 'Pbxt', 'page' => 'page']); (new ShowEngineController($response, new Template(), DatabaseInterface::getInstance()))($request); $this->dummyDbi->assertAllSelectsConsumed(); $actual = $response->getHTMLResult(); $enginePlugin = StorageEngine::getEngine('Pbxt'); $this->assertStringContainsString( htmlspecialchars($enginePlugin->getTitle()), $actual, ); $this->assertStringContainsString( MySQLDocumentation::show($enginePlugin->getMysqlHelpPage()), $actual, ); $this->assertStringContainsString( htmlspecialchars($enginePlugin->getComment()), $actual, ); $this->assertStringContainsString( __('Variables'), $actual, ); $this->assertStringContainsString('index.php?route=/server/engines/Pbxt/Documentation', $actual); $this->assertStringContainsString( $enginePlugin->getSupportInformationMessage(), $actual, ); $this->assertStringContainsString( 'There is no detailed status information available for this storage engine.', $actual, ); } }