aboutsummaryrefslogtreecommitdiffstats
path: root/apps/files_sharing/tests
diff options
context:
space:
mode:
authorRobin Appelman <robin@icewind.nl>2022-08-30 18:15:02 +0200
committerRobin Appelman <robin@icewind.nl>2022-08-31 15:47:00 +0200
commit1626a56ddab715e3c6af8081a9d696c74147ff79 (patch)
tree57b69d6fad632096d9c06dd890bc48dce7e7150f /apps/files_sharing/tests
parentd3743392e0087c267d20db14210acba17a3ec6d2 (diff)
downloadnextcloud-server-1626a56ddab715e3c6af8081a9d696c74147ff79.tar.gz
nextcloud-server-1626a56ddab715e3c6af8081a9d696c74147ff79.zip
adjusts tests for CloudIdManager
Signed-off-by: Robin Appelman <robin@icewind.nl>
Diffstat (limited to 'apps/files_sharing/tests')
-rw-r--r--apps/files_sharing/tests/External/CacheTest.php10
-rw-r--r--apps/files_sharing/tests/External/ManagerTest.php12
2 files changed, 17 insertions, 5 deletions
diff --git a/apps/files_sharing/tests/External/CacheTest.php b/apps/files_sharing/tests/External/CacheTest.php
index c538f7dd760..c77012c3e44 100644
--- a/apps/files_sharing/tests/External/CacheTest.php
+++ b/apps/files_sharing/tests/External/CacheTest.php
@@ -30,7 +30,9 @@ namespace OCA\Files_Sharing\Tests\External;
use OC\Federation\CloudIdManager;
use OCA\Files_Sharing\Tests\TestCase;
use OCP\Contacts\IManager;
+use OCP\EventDispatcher\IEventDispatcher;
use OCP\Federation\ICloudIdManager;
+use OCP\ICacheFactory;
use OCP\IURLGenerator;
use OCP\IUserManager;
@@ -68,7 +70,13 @@ class CacheTest extends TestCase {
$this->contactsManager = $this->createMock(IManager::class);
- $this->cloudIdManager = new CloudIdManager($this->contactsManager, $this->createMock(IURLGenerator::class), $this->createMock(IUserManager::class));
+ $this->cloudIdManager = new CloudIdManager(
+ $this->contactsManager,
+ $this->createMock(IURLGenerator::class),
+ $this->createMock(IUserManager::class),
+ $this->createMock(ICacheFactory::class),
+ $this->createMock(IEventDispatcher::class)
+ );
$this->remoteUser = $this->getUniqueID('remoteuser');
$this->storage = $this->getMockBuilder('\OCA\Files_Sharing\External\Storage')
diff --git a/apps/files_sharing/tests/External/ManagerTest.php b/apps/files_sharing/tests/External/ManagerTest.php
index 0b35e08da2d..86386144932 100644
--- a/apps/files_sharing/tests/External/ManagerTest.php
+++ b/apps/files_sharing/tests/External/ManagerTest.php
@@ -31,21 +31,19 @@
namespace OCA\Files_Sharing\Tests\External;
use OC\Federation\CloudIdManager;
-use OC\Files\SetupManager;
use OC\Files\SetupManagerFactory;
use OC\Files\Storage\StorageFactory;
use OCA\Files_Sharing\External\Manager;
use OCA\Files_Sharing\External\MountProvider;
use OCA\Files_Sharing\Tests\TestCase;
use OCP\Contacts\IManager;
-use OCP\Diagnostics\IEventLogger;
use OCP\EventDispatcher\IEventDispatcher;
use OCP\Federation\ICloudFederationFactory;
use OCP\Federation\ICloudFederationProviderManager;
-use OCP\Files\Config\IMountProviderCollection;
use OCP\Files\NotFoundException;
use OCP\Http\Client\IClientService;
use OCP\Http\Client\IResponse;
+use OCP\ICacheFactory;
use OCP\IGroup;
use OCP\IGroupManager;
use OCP\IURLGenerator;
@@ -130,7 +128,13 @@ class ManagerTest extends TestCase {
$this->testMountProvider = new MountProvider(\OC::$server->getDatabaseConnection(), function () {
return $this->manager;
- }, new CloudIdManager($this->contactsManager, $this->createMock(IURLGenerator::class), $this->userManager));
+ }, new CloudIdManager(
+ $this->contactsManager,
+ $this->createMock(IURLGenerator::class),
+ $this->userManager,
+ $this->createMock(ICacheFactory::class),
+ $this->createMock(IEventDispatcher::class)
+ ));
$group1 = $this->createMock(IGroup::class);
$group1->expects($this->any())->method('getGID')->willReturn('group1');