aboutsummaryrefslogtreecommitdiffstats
path: root/apps/files_sharing/tests/SizePropagationTest.php
diff options
context:
space:
mode:
Diffstat (limited to 'apps/files_sharing/tests/SizePropagationTest.php')
-rw-r--r--apps/files_sharing/tests/SizePropagationTest.php14
1 files changed, 9 insertions, 5 deletions
diff --git a/apps/files_sharing/tests/SizePropagationTest.php b/apps/files_sharing/tests/SizePropagationTest.php
index 1112cb03425..e1b67abca90 100644
--- a/apps/files_sharing/tests/SizePropagationTest.php
+++ b/apps/files_sharing/tests/SizePropagationTest.php
@@ -1,4 +1,5 @@
<?php
+
/**
* SPDX-FileCopyrightText: 2016-2024 Nextcloud GmbH and Nextcloud contributors
* SPDX-FileCopyrightText: 2016 ownCloud, Inc.
@@ -7,6 +8,9 @@
namespace OCA\Files_Sharing\Tests;
use OC\Files\View;
+use OCP\Constants;
+use OCP\ITempManager;
+use OCP\Server;
use OCP\Share\IShare;
use Test\Traits\UserTrait;
@@ -22,13 +26,13 @@ class SizePropagationTest extends TestCase {
protected function setupUser($name, $password = '') {
$this->createUser($name, $password);
- $tmpFolder = \OC::$server->getTempManager()->getTemporaryFolder();
+ $tmpFolder = Server::get(ITempManager::class)->getTemporaryFolder();
$this->registerMount($name, '\OC\Files\Storage\Local', '/' . $name, ['datadir' => $tmpFolder]);
$this->loginAsUser($name);
return new View('/' . $name . '/files');
}
- public function testSizePropagationWhenOwnerChangesFile() {
+ public function testSizePropagationWhenOwnerChangesFile(): void {
$recipientView = $this->setupUser(self::TEST_FILES_SHARING_API_USER1);
$ownerView = $this->setupUser(self::TEST_FILES_SHARING_API_USER2);
@@ -40,7 +44,7 @@ class SizePropagationTest extends TestCase {
'/sharedfolder',
self::TEST_FILES_SHARING_API_USER2,
self::TEST_FILES_SHARING_API_USER1,
- \OCP\Constants::PERMISSION_ALL
+ Constants::PERMISSION_ALL
);
$ownerRootInfo = $ownerView->getFileInfo('', false);
@@ -63,7 +67,7 @@ class SizePropagationTest extends TestCase {
$this->assertEquals($ownerRootInfo->getSize() + 3, $newOwnerRootInfo->getSize());
}
- public function testSizePropagationWhenRecipientChangesFile() {
+ public function testSizePropagationWhenRecipientChangesFile(): void {
$recipientView = $this->setupUser(self::TEST_FILES_SHARING_API_USER1);
$ownerView = $this->setupUser(self::TEST_FILES_SHARING_API_USER2);
@@ -75,7 +79,7 @@ class SizePropagationTest extends TestCase {
'/sharedfolder',
self::TEST_FILES_SHARING_API_USER2,
self::TEST_FILES_SHARING_API_USER1,
- \OCP\Constants::PERMISSION_ALL
+ Constants::PERMISSION_ALL
);
$ownerRootInfo = $ownerView->getFileInfo('', false);