l10n = $this->getMockBuilder(IL10N::class)->getMock(); $this->urlGenerator = $this->getMockBuilder(IUrlGenerator::class)->getMock(); $this->connection = \OCP\Server::get(IDBConnection::class); $this->check = new SupportedDatabase( $this->l10n, $this->urlGenerator, \OCP\Server::get(IDBConnection::class) ); } public function testPass(): void { $platform = $this->connection->getDatabasePlatform(); if ($platform instanceof SqlitePlatform) { /** SQlite always gets a warning */ $this->assertEquals(SetupResult::WARNING, $this->check->run()->getSeverity()); } else { $this->assertEquals(SetupResult::SUCCESS, $this->check->run()->getSeverity()); } } }