createStub(ServerRequest::class); $request->method('getParsedBodyParam')->willReturnMap([ ['collation_connection', null, 'utf8mb4_general_ci'], ]); $response = $this->createMock(ResponseRenderer::class); $response->expects($this->once())->method('header') ->with('Location: index.php?route=/' . Url::getCommonRaw([], '&')); $config = $this->createMock(Config::class); $config->expects($this->once())->method('setUserValue') ->with(null, 'DefaultConnectionCollation', 'utf8mb4_general_ci', 'utf8mb4_unicode_ci'); (new CollationConnectionController( $response, new Template(), $config ))($request); } }