createDatabaseInterface(); $this->dummyDbi = $this->createDbiDummy(); $this->dbi = $this->createDatabaseInterface($this->dummyDbi); $GLOBALS['dbi'] = $this->dbi; } public function testCheckRelationsController(): void { $GLOBALS['server'] = 1; $GLOBALS['db'] = ''; $GLOBALS['table'] = ''; $GLOBALS['text_dir'] = 'ltr'; $GLOBALS['PMA_PHP_SELF'] = 'index.php'; $request = $this->createStub(ServerRequest::class); $request->method('getParsedBodyParam')->willReturnMap([ ['create_pmadb', null, null], ['fixall_pmadb', null, null], ['fix_pmadb', null, null], ]); $response = new ResponseRenderer(); $controller = new CheckRelationsController($response, new Template(), new Relation($this->dbi)); $controller($request); $actual = $response->getHTMLResult(); $this->assertStringContainsString('phpMyAdmin configuration storage', $actual); $this->assertStringContainsString( 'Configuration of pmadb… not OK', $actual ); $this->assertStringContainsString( 'Create a database named \'phpmyadmin\' and setup the phpMyAdmin configuration storage there.', $actual ); } }