l10n = $this->getMockBuilder(IL10N::class)->getMock(); $this->urlGenerator = $this->getMockBuilder(IUrlGenerator::class)->getMock(); $this->connection = Server::get(IDBConnection::class); $this->check = new SupportedDatabase( $this->l10n, $this->urlGenerator, Server::get(IDBConnection::class) ); } public function testPass(): void { if ($this->connection->getDatabaseProvider() === IDBConnection::PLATFORM_SQLITE) { /** SQlite always gets a warning */ $this->assertEquals(SetupResult::WARNING, $this->check->run()->getSeverity()); } else { $this->assertContains($this->check->run()->getSeverity(), [SetupResult::SUCCESS, SetupResult::INFO]); } } }