diff options
Diffstat (limited to 'apps/files_sharing/tests/WatcherTest.php')
-rw-r--r-- | apps/files_sharing/tests/WatcherTest.php | 23 |
1 files changed, 14 insertions, 9 deletions
diff --git a/apps/files_sharing/tests/WatcherTest.php b/apps/files_sharing/tests/WatcherTest.php index c116f542fba..15676836915 100644 --- a/apps/files_sharing/tests/WatcherTest.php +++ b/apps/files_sharing/tests/WatcherTest.php @@ -1,4 +1,5 @@ <?php + /** * SPDX-FileCopyrightText: 2019-2024 Nextcloud GmbH and Nextcloud contributors * SPDX-FileCopyrightText: 2016 ownCloud, Inc. @@ -6,6 +7,10 @@ */ namespace OCA\Files_Sharing\Tests; +use OC\Files\Cache\Cache; +use OC\Files\Storage\Storage; +use OC\Files\View; +use OCP\Constants; use OCP\Share\IShare; /** @@ -15,19 +20,19 @@ use OCP\Share\IShare; */ class WatcherTest extends TestCase { - /** @var \OC\Files\Storage\Storage */ + /** @var Storage */ private $ownerStorage; - /** @var \OC\Files\Cache\Cache */ + /** @var Cache */ private $ownerCache; - /** @var \OC\Files\Storage\Storage */ + /** @var Storage */ private $sharedStorage; - /** @var \OC\Files\Cache\Cache */ + /** @var Cache */ private $sharedCache; - /** @var \OCP\Share\IShare */ + /** @var IShare */ private $_share; protected function setUp(): void { @@ -50,7 +55,7 @@ class WatcherTest extends TestCase { 'container/shareddir', self::TEST_FILES_SHARING_API_USER1, self::TEST_FILES_SHARING_API_USER2, - \OCP\Constants::PERMISSION_ALL + Constants::PERMISSION_ALL ); $this->_share->setStatus(IShare::STATUS_ACCEPTED); @@ -60,7 +65,7 @@ class WatcherTest extends TestCase { self::loginHelper(self::TEST_FILES_SHARING_API_USER2); // retrieve the shared storage - $secondView = new \OC\Files\View('/' . self::TEST_FILES_SHARING_API_USER2); + $secondView = new View('/' . self::TEST_FILES_SHARING_API_USER2); [$this->sharedStorage, $internalPath] = $secondView->resolvePath('files/shareddir'); $this->sharedCache = $this->sharedStorage->getCache(); } @@ -87,7 +92,7 @@ class WatcherTest extends TestCase { * Tests that writing a file using the shared storage will propagate the file * size to the owner's parent folders. */ - public function testFolderSizePropagationToOwnerStorage() { + public function testFolderSizePropagationToOwnerStorage(): void { $initialSizes = self::getOwnerDirSizes('files/container/shareddir'); $textData = 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ'; @@ -117,7 +122,7 @@ class WatcherTest extends TestCase { * Tests that writing a file using the shared storage will propagate the file * size to the owner's parent folders. */ - public function testSubFolderSizePropagationToOwnerStorage() { + public function testSubFolderSizePropagationToOwnerStorage(): void { $initialSizes = self::getOwnerDirSizes('files/container/shareddir/subdir'); $textData = 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ'; |