diff options
author | Côme Chilliet <come.chilliet@nextcloud.com> | 2024-08-12 15:15:58 +0200 |
---|---|---|
committer | Côme Chilliet <come.chilliet@nextcloud.com> | 2024-08-12 15:20:21 +0200 |
commit | 1cfc25d08cfd022762052b69f4216cb5e0b43ae7 (patch) | |
tree | 8c663385d9f6c4c042abb3c0fef6a5d179a0f49f /tests | |
parent | e23325f0472ab92d825f12715bffcfb37737e9e6 (diff) | |
download | nextcloud-server-1cfc25d08cfd022762052b69f4216cb5e0b43ae7.tar.gz nextcloud-server-1cfc25d08cfd022762052b69f4216cb5e0b43ae7.zip |
fix(tests): Adapt tests to change of DefaultShareProvider constructor
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
Diffstat (limited to 'tests')
-rw-r--r-- | tests/lib/Share20/DefaultShareProviderTest.php | 21 |
1 files changed, 15 insertions, 6 deletions
diff --git a/tests/lib/Share20/DefaultShareProviderTest.php b/tests/lib/Share20/DefaultShareProviderTest.php index 73e8912a9e3..017deeef114 100644 --- a/tests/lib/Share20/DefaultShareProviderTest.php +++ b/tests/lib/Share20/DefaultShareProviderTest.php @@ -72,6 +72,8 @@ class DefaultShareProviderTest extends \Test\TestCase { /** @var LoggerInterface|MockObject */ protected $logger; + protected IShareManager&MockObject $shareManager; + protected function setUp(): void { $this->dbConn = \OC::$server->getDatabaseConnection(); $this->userManager = $this->createMock(IUserManager::class); @@ -84,6 +86,7 @@ class DefaultShareProviderTest extends \Test\TestCase { $this->urlGenerator = $this->createMock(IURLGenerator::class); $this->timeFactory = $this->createMock(ITimeFactory::class); $this->logger = $this->createMock(LoggerInterface::class); + $this->shareManager = $this->createMock(IShareManager::class); $this->userManager->expects($this->any())->method('userExists')->willReturn(true); $this->timeFactory->expects($this->any())->method('now')->willReturn(new \DateTimeImmutable("2023-05-04 00:00 Europe/Berlin")); @@ -101,7 +104,8 @@ class DefaultShareProviderTest extends \Test\TestCase { $this->l10nFactory, $this->urlGenerator, $this->timeFactory, - $this->logger + $this->logger, + $this->shareManager, ); } @@ -464,7 +468,8 @@ class DefaultShareProviderTest extends \Test\TestCase { $this->l10nFactory, $this->urlGenerator, $this->timeFactory, - $this->logger + $this->logger, + $this->shareManager, ]) ->setMethods(['getShareById']) ->getMock(); @@ -560,7 +565,8 @@ class DefaultShareProviderTest extends \Test\TestCase { $this->l10nFactory, $this->urlGenerator, $this->timeFactory, - $this->logger + $this->logger, + $this->shareManager, ]) ->setMethods(['getShareById']) ->getMock(); @@ -2529,7 +2535,8 @@ class DefaultShareProviderTest extends \Test\TestCase { $this->l10nFactory, $this->urlGenerator, $this->timeFactory, - $this->logger + $this->logger, + $this->shareManager, ); $password = md5(time()); @@ -2628,7 +2635,8 @@ class DefaultShareProviderTest extends \Test\TestCase { $this->l10nFactory, $this->urlGenerator, $this->timeFactory, - $this->logger + $this->logger, + $this->shareManager, ); $u1 = $userManager->createUser('testShare1', 'test'); @@ -2725,7 +2733,8 @@ class DefaultShareProviderTest extends \Test\TestCase { $this->l10nFactory, $this->urlGenerator, $this->timeFactory, - $this->logger + $this->logger, + $this->shareManager, ); $u1 = $userManager->createUser('testShare1', 'test'); |