aboutsummaryrefslogtreecommitdiffstats
path: root/apps/oauth2/tests/Db/ClientMapperTest.php
diff options
context:
space:
mode:
Diffstat (limited to 'apps/oauth2/tests/Db/ClientMapperTest.php')
-rw-r--r--apps/oauth2/tests/Db/ClientMapperTest.php6
1 files changed, 4 insertions, 2 deletions
diff --git a/apps/oauth2/tests/Db/ClientMapperTest.php b/apps/oauth2/tests/Db/ClientMapperTest.php
index 7c11470d096..fccc0cd96fe 100644
--- a/apps/oauth2/tests/Db/ClientMapperTest.php
+++ b/apps/oauth2/tests/Db/ClientMapperTest.php
@@ -8,6 +8,8 @@ namespace OCA\OAuth2\Tests\Db;
use OCA\OAuth2\Db\Client;
use OCA\OAuth2\Db\ClientMapper;
use OCA\OAuth2\Exceptions\ClientNotFoundException;
+use OCP\IDBConnection;
+use OCP\Server;
use Test\TestCase;
/**
@@ -19,11 +21,11 @@ class ClientMapperTest extends TestCase {
protected function setUp(): void {
parent::setUp();
- $this->clientMapper = new ClientMapper(\OC::$server->getDatabaseConnection());
+ $this->clientMapper = new ClientMapper(Server::get(IDBConnection::class));
}
protected function tearDown(): void {
- $query = \OC::$server->getDatabaseConnection()->getQueryBuilder();
+ $query = Server::get(IDBConnection::class)->getQueryBuilder();
$query->delete('oauth2_clients')->execute();
parent::tearDown();