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-13 14:39:14 +0200 |
commit | 92885c5d07d7e30174e71a238b97150da61f1460 (patch) | |
tree | a3ca772084b0624dac2f7ba42ac74bf5b4b970fb /tests | |
parent | 21e47d4ff9ce3e85080750b7a104278418dfc52c (diff) | |
download | nextcloud-server-92885c5d07d7e30174e71a238b97150da61f1460.tar.gz nextcloud-server-92885c5d07d7e30174e71a238b97150da61f1460.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 315ee66bb31..27d0141084e 100644 --- a/tests/lib/Share20/DefaultShareProviderTest.php +++ b/tests/lib/Share20/DefaultShareProviderTest.php @@ -83,6 +83,8 @@ class DefaultShareProviderTest extends \Test\TestCase { /** @var ITimeFactory|MockObject */ protected $timeFactory; + protected IShareManager&MockObject $shareManager; + protected function setUp(): void { $this->dbConn = \OC::$server->getDatabaseConnection(); $this->userManager = $this->createMock(IUserManager::class); @@ -94,6 +96,7 @@ class DefaultShareProviderTest extends \Test\TestCase { $this->defaults = $this->getMockBuilder(Defaults::class)->disableOriginalConstructor()->getMock(); $this->urlGenerator = $this->createMock(IURLGenerator::class); $this->timeFactory = $this->createMock(ITimeFactory::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")); @@ -110,7 +113,8 @@ class DefaultShareProviderTest extends \Test\TestCase { $this->defaults, $this->l10nFactory, $this->urlGenerator, - $this->timeFactory + $this->timeFactory, + $this->shareManager, ); } @@ -471,7 +475,8 @@ class DefaultShareProviderTest extends \Test\TestCase { $this->defaults, $this->l10nFactory, $this->urlGenerator, - $this->timeFactory + $this->timeFactory, + $this->shareManager, ]) ->setMethods(['getShareById']) ->getMock(); @@ -566,7 +571,8 @@ class DefaultShareProviderTest extends \Test\TestCase { $this->defaults, $this->l10nFactory, $this->urlGenerator, - $this->timeFactory + $this->timeFactory, + $this->shareManager, ]) ->setMethods(['getShareById']) ->getMock(); @@ -2526,7 +2532,8 @@ class DefaultShareProviderTest extends \Test\TestCase { $this->defaults, $this->l10nFactory, $this->urlGenerator, - $this->timeFactory + $this->timeFactory, + $this->shareManager, ); $password = md5(time()); @@ -2624,7 +2631,8 @@ class DefaultShareProviderTest extends \Test\TestCase { $this->defaults, $this->l10nFactory, $this->urlGenerator, - $this->timeFactory + $this->timeFactory, + $this->shareManager, ); $u1 = $userManager->createUser('testShare1', 'test'); @@ -2720,7 +2728,8 @@ class DefaultShareProviderTest extends \Test\TestCase { $this->defaults, $this->l10nFactory, $this->urlGenerator, - $this->timeFactory + $this->timeFactory, + $this->shareManager, ); $u1 = $userManager->createUser('testShare1', 'test'); |