aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorRobin Appelman <robin@icewind.nl>2024-02-23 18:00:12 +0100
committerRobin Appelman <robin@icewind.nl>2024-02-26 18:46:35 +0100
commitd0ebe369061027e8026b93b5083dcaadc3a25412 (patch)
tree1668a8f57e14a6b878bf4db07748e42233ae752e /tests
parent00c53c9e78ffca1985b4b22314af08da10a09826 (diff)
downloadnextcloud-server-d0ebe369061027e8026b93b5083dcaadc3a25412.tar.gz
nextcloud-server-d0ebe369061027e8026b93b5083dcaadc3a25412.zip
fix: remove old test-only methods
Signed-off-by: Robin Appelman <robin@icewind.nl>
Diffstat (limited to 'tests')
-rw-r--r--tests/lib/Share/Backend.php10
1 files changed, 9 insertions, 1 deletions
diff --git a/tests/lib/Share/Backend.php b/tests/lib/Share/Backend.php
index 18443a4e247..f383d804971 100644
--- a/tests/lib/Share/Backend.php
+++ b/tests/lib/Share/Backend.php
@@ -21,6 +21,10 @@
namespace Test\Share;
+use OC\Share20\Manager;
+use OCP\Server;
+use OCP\Share\IShare;
+
class Backend implements \OCP\Share_Backend {
public const FORMAT_SOURCE = 0;
public const FORMAT_TARGET = 1;
@@ -46,7 +50,11 @@ class Backend implements \OCP\Share_Backend {
}
- $shares = \OC\Share\Share::getItemsSharedWithUser('test', $shareWith);
+ $shareManager = Server::get(Manager::class);
+ $shares = array_merge(
+ $shareManager->getSharedWith($shareWith, IShare::TYPE_USER),
+ $shareManager->getSharedWith($shareWith, IShare::TYPE_GROUP),
+ );
$knownTargets = [];
foreach ($shares as $share) {