diff options
author | Joas Schilling <coding@schilljs.com> | 2021-11-05 10:44:51 +0100 |
---|---|---|
committer | Joas Schilling <coding@schilljs.com> | 2021-11-09 10:10:53 +0100 |
commit | fa036b2001e0505006b6f9fe24d3fc56af937b06 (patch) | |
tree | 7d102e103cf131ccf3ec8d5650b6a3de13e835e6 /tests | |
parent | f4307ef4b16ffa1ea5a9e4697b57be36660a7953 (diff) | |
download | nextcloud-server-fa036b2001e0505006b6f9fe24d3fc56af937b06.tar.gz nextcloud-server-fa036b2001e0505006b6f9fe24d3fc56af937b06.zip |
Move common logic to share manager
Signed-off-by: Joas Schilling <coding@schilljs.com>
Diffstat (limited to 'tests')
-rw-r--r-- | tests/lib/Share20/ManagerTest.php | 35 |
1 files changed, 25 insertions, 10 deletions
diff --git a/tests/lib/Share20/ManagerTest.php b/tests/lib/Share20/ManagerTest.php index de8dc9fcc86..5c4d71b34c7 100644 --- a/tests/lib/Share20/ManagerTest.php +++ b/tests/lib/Share20/ManagerTest.php @@ -22,6 +22,7 @@ namespace Test\Share20; use OC\Files\Mount\MoveableMount; +use OC\KnownUser\KnownUserService; use OC\Share20\DefaultShareProvider; use OC\Share20\Exception; use OC\Share20\Manager; @@ -105,7 +106,10 @@ class ManagerTest extends \Test\TestCase { protected $urlGenerator; /** @var \OC_Defaults|MockObject */ protected $defaults; + /** @var IUserSession|MockObject */ protected $userSession; + /** @var KnownUserService|MockObject */ + protected $knownUserService; protected function setUp(): void { $this->logger = $this->createMock(ILogger::class); @@ -122,6 +126,7 @@ class ManagerTest extends \Test\TestCase { $this->defaults = $this->createMock(\OC_Defaults::class); $this->dispatcher = $this->createMock(IEventDispatcher::class); $this->userSession = $this->createMock(IUserSession::class); + $this->knownUserService = $this->createMock(KnownUserService::class); $this->l10nFactory = $this->createMock(IFactory::class); $this->l = $this->createMock(IL10N::class); @@ -153,7 +158,8 @@ class ManagerTest extends \Test\TestCase { $this->urlGenerator, $this->defaults, $this->dispatcher, - $this->userSession + $this->userSession, + $this->knownUserService ); $this->defaultProvider = $this->createMock(DefaultShareProvider::class); @@ -183,7 +189,8 @@ class ManagerTest extends \Test\TestCase { $this->urlGenerator, $this->defaults, $this->dispatcher, - $this->userSession + $this->userSession, + $this->knownUserService ]); } @@ -2696,7 +2703,8 @@ class ManagerTest extends \Test\TestCase { $this->urlGenerator, $this->defaults, $this->dispatcher, - $this->userSession + $this->userSession, + $this->knownUserService ); $share = $this->createMock(IShare::class); @@ -2741,7 +2749,8 @@ class ManagerTest extends \Test\TestCase { $this->urlGenerator, $this->defaults, $this->dispatcher, - $this->userSession + $this->userSession, + $this->knownUserService ); $share = $this->createMock(IShare::class); @@ -2793,7 +2802,8 @@ class ManagerTest extends \Test\TestCase { $this->urlGenerator, $this->defaults, $this->dispatcher, - $this->userSession + $this->userSession, + $this->knownUserService ); $share = $this->createMock(IShare::class); @@ -4132,7 +4142,8 @@ class ManagerTest extends \Test\TestCase { $this->urlGenerator, $this->defaults, $this->dispatcher, - $this->userSession + $this->userSession, + $this->knownUserService ); $this->assertSame($expected, $manager->shareProviderExists($shareType) @@ -4166,7 +4177,8 @@ class ManagerTest extends \Test\TestCase { $this->urlGenerator, $this->defaults, $this->dispatcher, - $this->userSession + $this->userSession, + $this->knownUserService ); $factory->setProvider($this->defaultProvider); @@ -4231,7 +4243,8 @@ class ManagerTest extends \Test\TestCase { $this->urlGenerator, $this->defaults, $this->dispatcher, - $this->userSession + $this->userSession, + $this->knownUserService ); $factory->setProvider($this->defaultProvider); @@ -4348,7 +4361,8 @@ class ManagerTest extends \Test\TestCase { $this->urlGenerator, $this->defaults, $this->dispatcher, - $this->userSession + $this->userSession, + $this->knownUserService ); $factory->setProvider($this->defaultProvider); @@ -4474,7 +4488,8 @@ class ManagerTest extends \Test\TestCase { $this->urlGenerator, $this->defaults, $this->dispatcher, - $this->userSession + $this->userSession, + $this->knownUserService ); $factory->setProvider($this->defaultProvider); |