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 ); } }