diff options
author | Andrew Summers <18727110+summersab@users.noreply.github.com> | 2023-08-29 17:07:38 -0500 |
---|---|---|
committer | Andrew Summers <18727110+summersab@users.noreply.github.com> | 2023-08-29 21:32:58 -0500 |
commit | 6b09a79227a5dc98aa4620c6e5e15b610a06c806 (patch) | |
tree | d6bf73c77bcd6fee4374bdfe93aae7b3d9af5f78 /tests/lib/Share20/DefaultShareProviderTest.php | |
parent | 9d1547f59d53b46ba401ddf0e7f4c6e4f067004e (diff) | |
download | nextcloud-server-6b09a79227a5dc98aa4620c6e5e15b610a06c806.tar.gz nextcloud-server-6b09a79227a5dc98aa4620c6e5e15b610a06c806.zip |
Refactor `OC\Server::getShareManager`
Signed-off-by: Andrew Summers <18727110+summersab@users.noreply.github.com>
Diffstat (limited to 'tests/lib/Share20/DefaultShareProviderTest.php')
-rw-r--r-- | tests/lib/Share20/DefaultShareProviderTest.php | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/tests/lib/Share20/DefaultShareProviderTest.php b/tests/lib/Share20/DefaultShareProviderTest.php index 0a6f106a5db..08e7d1aa274 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; @@ -2540,7 +2541,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()) @@ -2644,7 +2645,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()) @@ -2740,7 +2741,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()) |