Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/server.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorJoas Schilling <coding@schilljs.com>2020-06-03 10:29:19 +0300
committerbackportbot[bot] <backportbot[bot]@users.noreply.github.com>2020-06-04 12:03:54 +0300
commitf97a61aa1421359c76062d0cbce9f59af302dc6b (patch)
tree497e2d1caa3e416354af43479ae6d6dbc2a7d465 /tests
parent857b09e068e003a7e5c52e6f5c686cb7eb50e09f (diff)
Prevent harder to share your root
Signed-off-by: Joas Schilling <coding@schilljs.com>
Diffstat (limited to 'tests')
-rw-r--r--tests/lib/Share20/ManagerTest.php6
1 files changed, 4 insertions, 2 deletions
diff --git a/tests/lib/Share20/ManagerTest.php b/tests/lib/Share20/ManagerTest.php
index 9bc1531ac7f..476413b67ad 100644
--- a/tests/lib/Share20/ManagerTest.php
+++ b/tests/lib/Share20/ManagerTest.php
@@ -647,7 +647,7 @@ class ManagerTest extends \Test\TestCase {
$rootFolder = $this->createMock(Folder::class);
$rootFolder->method('isShareable')->willReturn(true);
$rootFolder->method('getPermissions')->willReturn(\OCP\Constants::PERMISSION_ALL);
- $rootFolder->method('getPath')->willReturn('myrootfolder');
+ $rootFolder->method('getId')->willReturn(42);
$data[] = [$this->createShare(null, \OCP\Share::SHARE_TYPE_USER, $rootFolder, $user2, $user0, $user0, 30, null, null), 'You can’t share your root folder', true];
$data[] = [$this->createShare(null, \OCP\Share::SHARE_TYPE_GROUP, $rootFolder, $group0, $user0, $user0, 2, null, null), 'You can’t share your root folder', true];
@@ -707,7 +707,9 @@ class ManagerTest extends \Test\TestCase {
]));
$userFolder = $this->createMock(Folder::class);
- $userFolder->method('getPath')->willReturn('myrootfolder');
+ $userFolder->expects($this->any())
+ ->method('getId')
+ ->willReturn(42);
$userFolder->expects($this->any())
->method('getRelativePath')
->willReturnArgument(0);