diff options
Diffstat (limited to 'apps/files_sharing/tests/PropagationTestCase.php')
-rw-r--r-- | apps/files_sharing/tests/PropagationTestCase.php | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/apps/files_sharing/tests/PropagationTestCase.php b/apps/files_sharing/tests/PropagationTestCase.php index 04852e53e21..98bf5ad92fd 100644 --- a/apps/files_sharing/tests/PropagationTestCase.php +++ b/apps/files_sharing/tests/PropagationTestCase.php @@ -1,4 +1,5 @@ <?php + /** * SPDX-FileCopyrightText: 2019-2024 Nextcloud GmbH and Nextcloud contributors * SPDX-FileCopyrightText: 2016 ownCloud, Inc. @@ -8,6 +9,8 @@ namespace OCA\Files_Sharing\Tests; use OC\Files\View; use OCA\Files_Sharing\Helper; +use OCP\IUserSession; +use OCP\Server; abstract class PropagationTestCase extends TestCase { /** @@ -42,7 +45,7 @@ abstract class PropagationTestCase extends TestCase { * @param string $subPath */ protected function assertEtagsChanged($users, $subPath = '') { - $oldUser = \OC::$server->getUserSession()->getUser(); + $oldUser = Server::get(IUserSession::class)->getUser(); foreach ($users as $user) { $this->loginAsUser($user); $id = $this->fileIds[$user][$subPath]; @@ -59,7 +62,7 @@ abstract class PropagationTestCase extends TestCase { * @param string $subPath */ protected function assertEtagsNotChanged($users, $subPath = '') { - $oldUser = \OC::$server->getUserSession()->getUser(); + $oldUser = Server::get(IUserSession::class)->getUser(); foreach ($users as $user) { $this->loginAsUser($user); $id = $this->fileIds[$user][$subPath]; |