aboutsummaryrefslogtreecommitdiffstats
path: root/tests/lib
diff options
context:
space:
mode:
Diffstat (limited to 'tests/lib')
-rw-r--r--tests/lib/Files/ViewTest.php3
-rw-r--r--tests/lib/Share20/DefaultShareProviderTest.php7
-rw-r--r--tests/lib/Share20/LegacyHooksTest.php3
3 files changed, 8 insertions, 5 deletions
diff --git a/tests/lib/Files/ViewTest.php b/tests/lib/Files/ViewTest.php
index c4e17fd3118..f67c4e9642b 100644
--- a/tests/lib/Files/ViewTest.php
+++ b/tests/lib/Files/ViewTest.php
@@ -26,6 +26,7 @@ use OCP\Files\Storage\IStorage;
use OCP\IDBConnection;
use OCP\Lock\ILockingProvider;
use OCP\Lock\LockedException;
+use OCP\Share\IManager as IShareManager;
use OCP\Share\IShare;
use OCP\Util;
use Test\HookHelper;
@@ -1684,7 +1685,7 @@ class ViewTest extends \Test\TestCase {
$userFolder = \OC::$server->getUserFolder($this->user);
$shareDir = $userFolder->get('shareddir');
- $shareManager = \OC::$server->getShareManager();
+ $shareManager = \OC::$server->get(IShareManager::class);
$share = $shareManager->newShare();
$share->setSharedWith('test2')
->setSharedBy($this->user)
diff --git a/tests/lib/Share20/DefaultShareProviderTest.php b/tests/lib/Share20/DefaultShareProviderTest.php
index e1cdb8530c3..315ee66bb31 100644
--- a/tests/lib/Share20/DefaultShareProviderTest.php
+++ b/tests/lib/Share20/DefaultShareProviderTest.php
@@ -39,6 +39,7 @@ use OCP\IUser;
use OCP\IUserManager;
use OCP\L10N\IFactory;
use OCP\Mail\IMailer;
+use OCP\Share\IManager as IShareManager;
use OCP\Share\IShare;
use PHPUnit\Framework\MockObject\MockObject;
@@ -2541,7 +2542,7 @@ class DefaultShareProviderTest extends \Test\TestCase {
$file1 = $folder1->newFile('bar');
$folder2 = $folder1->newFolder('baz');
- $shareManager = \OC::$server->getShareManager();
+ $shareManager = \OC::$server->get(IShareManager::class);
$share1 = $shareManager->newShare();
$share1->setNode($folder1)
->setSharedBy($u1->getUID())
@@ -2645,7 +2646,7 @@ class DefaultShareProviderTest extends \Test\TestCase {
$this->assertCount(0, $result['users']);
$this->assertFalse($result['public']);
- $shareManager = \OC::$server->getShareManager();
+ $shareManager = \OC::$server->get(IShareManager::class);
$share1 = $shareManager->newShare();
$share1->setNode($folder1)
->setSharedBy($u1->getUID())
@@ -2741,7 +2742,7 @@ class DefaultShareProviderTest extends \Test\TestCase {
$this->assertCount(0, $result['users']);
$this->assertFalse($result['public']);
- $shareManager = \OC::$server->getShareManager();
+ $shareManager = \OC::$server->get(IShareManager::class);
$share1 = $shareManager->newShare();
$share1->setNode($folder1)
->setSharedBy($u1->getUID())
diff --git a/tests/lib/Share20/LegacyHooksTest.php b/tests/lib/Share20/LegacyHooksTest.php
index 728f320ea9e..239b3c91ca1 100644
--- a/tests/lib/Share20/LegacyHooksTest.php
+++ b/tests/lib/Share20/LegacyHooksTest.php
@@ -35,6 +35,7 @@ use OCP\Share\Events\BeforeShareDeletedEvent;
use OCP\Share\Events\ShareCreatedEvent;
use OCP\Share\Events\ShareDeletedEvent;
use OCP\Share\Events\ShareDeletedFromSelfEvent;
+use OCP\Share\IManager as IShareManager;
use OCP\Share\IShare;
use Psr\Log\LoggerInterface;
use Test\TestCase;
@@ -56,7 +57,7 @@ class LegacyHooksTest extends TestCase {
$logger = $this->createMock(LoggerInterface::class);
$this->eventDispatcher = new \OC\EventDispatcher\EventDispatcher($symfonyDispatcher, \OC::$server->get(IServerContainer::class), $logger);
$this->hooks = new LegacyHooks($this->eventDispatcher);
- $this->manager = \OC::$server->getShareManager();
+ $this->manager = \OC::$server->get(IShareManager::class);
}
public function testPreUnshare() {