aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChristopher Ng <chrng8@gmail.com>2025-01-09 14:52:33 -0800
committerChristopher Ng <chrng8@gmail.com>2025-01-15 15:50:43 -0800
commit42d997bcd718d6a62c5f0b184f66873770380185 (patch)
tree1ec0f083ea24b64dcac930b03d6e524f07ff0a6a
parent3c62d6853434e5fd0efe61f455c66dfdf152ba2c (diff)
downloadnextcloud-server-42d997bcd718d6a62c5f0b184f66873770380185.tar.gz
nextcloud-server-42d997bcd718d6a62c5f0b184f66873770380185.zip
test: Update tests
Signed-off-by: Christopher Ng <chrng8@gmail.com>
-rw-r--r--apps/files_sharing/tests/CapabilitiesTest.php2
-rw-r--r--tests/lib/Share20/ManagerTest.php7
2 files changed, 9 insertions, 0 deletions
diff --git a/apps/files_sharing/tests/CapabilitiesTest.php b/apps/files_sharing/tests/CapabilitiesTest.php
index c188cbfdfcc..737362e2195 100644
--- a/apps/files_sharing/tests/CapabilitiesTest.php
+++ b/apps/files_sharing/tests/CapabilitiesTest.php
@@ -13,6 +13,7 @@ use OCA\Files_Sharing\Capabilities;
use OCP\EventDispatcher\IEventDispatcher;
use OCP\Files\IRootFolder;
use OCP\Files\Mount\IMountManager;
+use OCP\IAppConfig;
use OCP\IConfig;
use OCP\IDateTimeZone;
use OCP\IGroupManager;
@@ -75,6 +76,7 @@ class CapabilitiesTest extends \Test\TestCase {
$this->createMock(KnownUserService::class),
$this->createMock(ShareDisableChecker::class),
$this->createMock(IDateTimeZone::class),
+ $this->createMock(IAppConfig::class),
);
$cap = new Capabilities($config, $shareManager);
$result = $this->getFilesSharingPart($cap->getCapabilities());
diff --git a/tests/lib/Share20/ManagerTest.php b/tests/lib/Share20/ManagerTest.php
index 091a79e6d40..1afe0473cea 100644
--- a/tests/lib/Share20/ManagerTest.php
+++ b/tests/lib/Share20/ManagerTest.php
@@ -28,6 +28,7 @@ use OCP\Files\Node;
use OCP\Files\NotFoundException;
use OCP\Files\Storage\IStorage;
use OCP\HintException;
+use OCP\IAppConfig;
use OCP\IConfig;
use OCP\IDateTimeZone;
use OCP\IGroup;
@@ -109,6 +110,8 @@ class ManagerTest extends \Test\TestCase {
private DateTimeZone $timezone;
/** @var IDateTimeZone|MockObject */
protected $dateTimeZone;
+ /** @var IAppConfig|MockObject */
+ protected $appConfig;
protected function setUp(): void {
$this->logger = $this->createMock(LoggerInterface::class);
@@ -131,6 +134,8 @@ class ManagerTest extends \Test\TestCase {
$this->timezone = new \DateTimeZone('Pacific/Auckland');
$this->dateTimeZone->method('getTimeZone')->willReturnCallback(fn () => $this->timezone);
+ $this->appConfig = $this->createMock(IAppConfig::class);
+
$this->l10nFactory = $this->createMock(IFactory::class);
$this->l = $this->createMock(IL10N::class);
$this->l->method('t')
@@ -172,6 +177,7 @@ class ManagerTest extends \Test\TestCase {
$this->knownUserService,
$this->shareDisabledChecker,
$this->dateTimeZone,
+ $this->appConfig,
);
}
@@ -199,6 +205,7 @@ class ManagerTest extends \Test\TestCase {
$this->knownUserService,
$this->shareDisabledChecker,
$this->dateTimeZone,
+ $this->appConfig,
]);
}