diff options
Diffstat (limited to 'apps/files_sharing/tests/LockingTest.php')
-rw-r--r-- | apps/files_sharing/tests/LockingTest.php | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/apps/files_sharing/tests/LockingTest.php b/apps/files_sharing/tests/LockingTest.php index 1e822d6339e..280c364a136 100644 --- a/apps/files_sharing/tests/LockingTest.php +++ b/apps/files_sharing/tests/LockingTest.php @@ -1,4 +1,5 @@ <?php + /** * SPDX-FileCopyrightText: 2018-2024 Nextcloud GmbH and Nextcloud contributors * SPDX-FileCopyrightText: 2016 ownCloud, Inc. @@ -9,8 +10,10 @@ namespace OCA\Files_Sharing\Tests; use OC\Files\Filesystem; use OC\Files\View; use OCP\Constants; +use OCP\IUserManager; use OCP\Lock\ILockingProvider; use OCP\Lock\LockedException; +use OCP\Server; use OCP\Share\IShare; /** @@ -33,7 +36,7 @@ class LockingTest extends TestCase { parent::setUp(); $this->userBackend = new \Test\Util\User\Dummy(); - \OC::$server->getUserManager()->registerBackend($this->userBackend); + Server::get(IUserManager::class)->registerBackend($this->userBackend); $this->ownerUid = $this->getUniqueID('owner_'); $this->recipientUid = $this->getUniqueID('recipient_'); @@ -58,7 +61,7 @@ class LockingTest extends TestCase { } protected function tearDown(): void { - \OC::$server->getUserManager()->removeBackend($this->userBackend); + Server::get(IUserManager::class)->removeBackend($this->userBackend); parent::tearDown(); } |