Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
chore(tests): Adapt DefaultShareProviderTest to new constructor param…
…eter

Signed-off-by: Côme Chilliet <[email protected]>
  • Loading branch information
come-nc authored and backportbot[bot] committed Jul 29, 2025
commit 3dac67991ba983d8fb859f6efb21991c0b39d8c7
10 changes: 10 additions & 0 deletions tests/lib/Share20/DefaultShareProviderTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
use OCP\Files\File;
use OCP\Files\Folder;
use OCP\Files\IRootFolder;
use OCP\IConfig;
use OCP\IDBConnection;
use OCP\IGroup;
use OCP\IGroupManager;
Expand Down Expand Up @@ -73,6 +74,8 @@ class DefaultShareProviderTest extends \Test\TestCase {
/** @var LoggerInterface|MockObject */
protected $logger;

protected IConfig&MockObject $config;

protected IShareManager&MockObject $shareManager;

protected function setUp(): void {
Expand All @@ -88,6 +91,7 @@ protected function setUp(): void {
$this->timeFactory = $this->createMock(ITimeFactory::class);
$this->logger = $this->createMock(LoggerInterface::class);
$this->shareManager = $this->createMock(IShareManager::class);
$this->config = $this->createMock(IConfig::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'));
Expand All @@ -107,6 +111,7 @@ protected function setUp(): void {
$this->timeFactory,
$this->logger,
$this->shareManager,
$this->config,
);
}

Expand Down Expand Up @@ -471,6 +476,7 @@ public function testDeleteSingleShare() {
$this->timeFactory,
$this->logger,
$this->shareManager,
$this->config,
])
->setMethods(['getShareById'])
->getMock();
Expand Down Expand Up @@ -568,6 +574,7 @@ public function testDeleteGroupShareWithUserGroupShares() {
$this->timeFactory,
$this->logger,
$this->shareManager,
$this->config,
])
->setMethods(['getShareById'])
->getMock();
Expand Down Expand Up @@ -2572,6 +2579,7 @@ public function testGetSharesInFolder() {
$this->timeFactory,
$this->logger,
$this->shareManager,
$this->config,
);

$password = md5(time());
Expand Down Expand Up @@ -2672,6 +2680,7 @@ public function testGetAccessListNoCurrentAccessRequired() {
$this->timeFactory,
$this->logger,
$this->shareManager,
$this->config,
);

$u1 = $userManager->createUser('testShare1', 'test');
Expand Down Expand Up @@ -2775,6 +2784,7 @@ public function testGetAccessListCurrentAccessRequired() {
$this->timeFactory,
$this->logger,
$this->shareManager,
$this->config,
);

$u1 = $userManager->createUser('testShare1', 'test');
Expand Down
Loading