aboutsummaryrefslogtreecommitdiffstats
path: root/tests/lib/Lock/NonCachingDBLockingProviderTest.php
diff options
context:
space:
mode:
Diffstat (limited to 'tests/lib/Lock/NonCachingDBLockingProviderTest.php')
-rw-r--r--tests/lib/Lock/NonCachingDBLockingProviderTest.php10
1 files changed, 7 insertions, 3 deletions
diff --git a/tests/lib/Lock/NonCachingDBLockingProviderTest.php b/tests/lib/Lock/NonCachingDBLockingProviderTest.php
index b79709a08e7..4f05f0ba892 100644
--- a/tests/lib/Lock/NonCachingDBLockingProviderTest.php
+++ b/tests/lib/Lock/NonCachingDBLockingProviderTest.php
@@ -1,4 +1,5 @@
<?php
+
/**
* SPDX-FileCopyrightText: 2018 Nextcloud GmbH and Nextcloud contributors
* SPDX-License-Identifier: AGPL-3.0-or-later
@@ -6,7 +7,10 @@
namespace Test\Lock;
+use OC\Lock\DBLockingProvider;
+use OCP\IDBConnection;
use OCP\Lock\ILockingProvider;
+use OCP\Server;
/**
* @group DB
@@ -15,11 +19,11 @@ use OCP\Lock\ILockingProvider;
*/
class NonCachingDBLockingProviderTest extends DBLockingProviderTest {
/**
- * @return \OCP\Lock\ILockingProvider
+ * @return ILockingProvider
*/
protected function getInstance() {
- $this->connection = \OC::$server->getDatabaseConnection();
- return new \OC\Lock\DBLockingProvider($this->connection, $this->timeFactory, 3600, false);
+ $this->connection = Server::get(IDBConnection::class);
+ return new DBLockingProvider($this->connection, $this->timeFactory, 3600, false);
}
public function testDoubleShared(): void {