mirror of
https://github.com/nextcloud/server.git
synced 2026-06-11 01:30:50 -04:00
chore(tests): Adapt DefaultShareProviderTest to new constructor parameter
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
This commit is contained in:
parent
5b2d52afe6
commit
8de6b95152
1 changed files with 10 additions and 0 deletions
|
|
@ -16,6 +16,7 @@ use OCP\Defaults;
|
|||
use OCP\Files\File;
|
||||
use OCP\Files\Folder;
|
||||
use OCP\Files\IRootFolder;
|
||||
use OCP\IConfig;
|
||||
use OCP\IDBConnection;
|
||||
use OCP\IGroup;
|
||||
use OCP\IGroupManager;
|
||||
|
|
@ -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 {
|
||||
|
|
@ -88,6 +91,7 @@ class DefaultShareProviderTest extends \Test\TestCase {
|
|||
$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'));
|
||||
|
|
@ -107,6 +111,7 @@ class DefaultShareProviderTest extends \Test\TestCase {
|
|||
$this->timeFactory,
|
||||
$this->logger,
|
||||
$this->shareManager,
|
||||
$this->config,
|
||||
);
|
||||
}
|
||||
|
||||
|
|
@ -471,6 +476,7 @@ class DefaultShareProviderTest extends \Test\TestCase {
|
|||
$this->timeFactory,
|
||||
$this->logger,
|
||||
$this->shareManager,
|
||||
$this->config,
|
||||
])
|
||||
->setMethods(['getShareById'])
|
||||
->getMock();
|
||||
|
|
@ -568,6 +574,7 @@ class DefaultShareProviderTest extends \Test\TestCase {
|
|||
$this->timeFactory,
|
||||
$this->logger,
|
||||
$this->shareManager,
|
||||
$this->config,
|
||||
])
|
||||
->setMethods(['getShareById'])
|
||||
->getMock();
|
||||
|
|
@ -2572,6 +2579,7 @@ class DefaultShareProviderTest extends \Test\TestCase {
|
|||
$this->timeFactory,
|
||||
$this->logger,
|
||||
$this->shareManager,
|
||||
$this->config,
|
||||
);
|
||||
|
||||
$password = md5(time());
|
||||
|
|
@ -2672,6 +2680,7 @@ class DefaultShareProviderTest extends \Test\TestCase {
|
|||
$this->timeFactory,
|
||||
$this->logger,
|
||||
$this->shareManager,
|
||||
$this->config,
|
||||
);
|
||||
|
||||
$u1 = $userManager->createUser('testShare1', 'test');
|
||||
|
|
@ -2775,6 +2784,7 @@ class DefaultShareProviderTest extends \Test\TestCase {
|
|||
$this->timeFactory,
|
||||
$this->logger,
|
||||
$this->shareManager,
|
||||
$this->config,
|
||||
);
|
||||
|
||||
$u1 = $userManager->createUser('testShare1', 'test');
|
||||
|
|
|
|||
Loading…
Reference in a new issue