dummyDbi = $this->createDbiDummy(); $this->dbi = $this->createDatabaseInterface($this->dummyDbi); $GLOBALS['dbi'] = $this->dbi; $GLOBALS['cfg']['MaxRows'] = 10; $GLOBALS['cfg']['ServerDefault'] = 'server'; $GLOBALS['cfg']['Server']['DisableIS'] = false; $GLOBALS['server'] = 1; $GLOBALS['db'] = 'db'; $GLOBALS['table'] = 'table'; SessionCache::set('profiling_supported', true); } public function testIndex(): void { $response = new ResponseRenderer(); $controller = new BinlogController($response, new Template(), $GLOBALS['dbi']); $request = $this->createStub(ServerRequest::class); $request->method('getParsedBodyParam')->willReturnMap([['log', null, 'index1'], ['pos', 0, '3']]); $this->dummyDbi->addSelectDb('mysql'); $controller($request); $this->dummyDbi->assertAllSelectsConsumed(); $actual = $response->getHTMLResult(); $this->assertStringContainsString('Select binary log to view', $actual); $this->assertStringContainsString('