diff options
Diffstat (limited to 'apps/files_sharing/tests/PropagationTestCase.php')
-rw-r--r-- | apps/files_sharing/tests/PropagationTestCase.php | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/apps/files_sharing/tests/PropagationTestCase.php b/apps/files_sharing/tests/PropagationTestCase.php index dee056f0658..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. @@ -6,9 +7,14 @@ */ 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 { /** - * @var \OC\Files\View + * @var View */ protected $rootView; protected $fileIds = []; // [$user=>[$path=>$id]] @@ -16,7 +22,7 @@ abstract class PropagationTestCase extends TestCase { public static function setUpBeforeClass(): void { parent::setUpBeforeClass(); - \OCA\Files_Sharing\Helper::registerHooks(); + Helper::registerHooks(); } protected function setUp(): void { @@ -39,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]; @@ -56,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]; |