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
diff options
context:
space:
mode:
authorRobin Appelman <robin@icewind.nl>2021-04-23 18:29:34 +0300
committerRobin Appelman <robin@icewind.nl>2021-05-12 17:11:28 +0300
commitb1dca57a1ce59bacc4089761275e4366e9760313 (patch)
treeed79b9ab833ee9af257dc4f0e68afbd28656043c /tests/lib/Share20
parent7e1c842d96cde01ebb6854b3e28fb998006575b2 (diff)
load share settings from the share manager in more places
Signed-off-by: Robin Appelman <robin@icewind.nl>
Diffstat (limited to 'tests/lib/Share20')
-rw-r--r--tests/lib/Share20/ManagerTest.php33
1 files changed, 23 insertions, 10 deletions
diff --git a/tests/lib/Share20/ManagerTest.php b/tests/lib/Share20/ManagerTest.php
index a4dd621522d..0930aaca0aa 100644
--- a/tests/lib/Share20/ManagerTest.php
+++ b/tests/lib/Share20/ManagerTest.php
@@ -45,6 +45,7 @@ use OCP\IServerContainer;
use OCP\IURLGenerator;
use OCP\IUser;
use OCP\IUserManager;
+use OCP\IUserSession;
use OCP\L10N\IFactory;
use OCP\Mail\IMailer;
use OCP\Security\Events\ValidatePasswordPolicyEvent;
@@ -104,6 +105,7 @@ class ManagerTest extends \Test\TestCase {
protected $urlGenerator;
/** @var \OC_Defaults|MockObject */
protected $defaults;
+ protected $userSession;
protected function setUp(): void {
$this->logger = $this->createMock(ILogger::class);
@@ -119,6 +121,7 @@ class ManagerTest extends \Test\TestCase {
$this->urlGenerator = $this->createMock(IURLGenerator::class);
$this->defaults = $this->createMock(\OC_Defaults::class);
$this->dispatcher = $this->createMock(IEventDispatcher::class);
+ $this->userSession = $this->createMock(IUserSession::class);
$this->l10nFactory = $this->createMock(IFactory::class);
$this->l = $this->createMock(IL10N::class);
@@ -149,7 +152,8 @@ class ManagerTest extends \Test\TestCase {
$this->mailer,
$this->urlGenerator,
$this->defaults,
- $this->dispatcher
+ $this->dispatcher,
+ $this->userSession
);
$this->defaultProvider = $this->createMock(DefaultShareProvider::class);
@@ -178,7 +182,8 @@ class ManagerTest extends \Test\TestCase {
$this->mailer,
$this->urlGenerator,
$this->defaults,
- $this->dispatcher
+ $this->dispatcher,
+ $this->userSession
]);
}
@@ -2690,7 +2695,8 @@ class ManagerTest extends \Test\TestCase {
$this->mailer,
$this->urlGenerator,
$this->defaults,
- $this->dispatcher
+ $this->dispatcher,
+ $this->userSession
);
$share = $this->createMock(IShare::class);
@@ -2734,7 +2740,8 @@ class ManagerTest extends \Test\TestCase {
$this->mailer,
$this->urlGenerator,
$this->defaults,
- $this->dispatcher
+ $this->dispatcher,
+ $this->userSession
);
$share = $this->createMock(IShare::class);
@@ -2785,7 +2792,8 @@ class ManagerTest extends \Test\TestCase {
$this->mailer,
$this->urlGenerator,
$this->defaults,
- $this->dispatcher
+ $this->dispatcher,
+ $this->userSession
);
$share = $this->createMock(IShare::class);
@@ -4123,7 +4131,8 @@ class ManagerTest extends \Test\TestCase {
$this->mailer,
$this->urlGenerator,
$this->defaults,
- $this->dispatcher
+ $this->dispatcher,
+ $this->userSession
);
$this->assertSame($expected,
$manager->shareProviderExists($shareType)
@@ -4156,7 +4165,8 @@ class ManagerTest extends \Test\TestCase {
$this->mailer,
$this->urlGenerator,
$this->defaults,
- $this->dispatcher
+ $this->dispatcher,
+ $this->userSession
);
$factory->setProvider($this->defaultProvider);
@@ -4220,7 +4230,8 @@ class ManagerTest extends \Test\TestCase {
$this->mailer,
$this->urlGenerator,
$this->defaults,
- $this->dispatcher
+ $this->dispatcher,
+ $this->userSession
);
$factory->setProvider($this->defaultProvider);
@@ -4336,7 +4347,8 @@ class ManagerTest extends \Test\TestCase {
$this->mailer,
$this->urlGenerator,
$this->defaults,
- $this->dispatcher
+ $this->dispatcher,
+ $this->userSession
);
$factory->setProvider($this->defaultProvider);
@@ -4461,7 +4473,8 @@ class ManagerTest extends \Test\TestCase {
$this->mailer,
$this->urlGenerator,
$this->defaults,
- $this->dispatcher
+ $this->dispatcher,
+ $this->userSession
);
$factory->setProvider($this->defaultProvider);