diff options
author | Julius Härtl <jus@bitgrid.net> | 2021-07-09 09:00:03 +0300 |
---|---|---|
committer | Julius Härtl <jus@bitgrid.net> | 2021-07-14 17:08:05 +0300 |
commit | 7179002600ccde6d6757c068c9388430ed71a2f1 (patch) | |
tree | 5b0fd29678ce392db2764923d5f6bb393435d596 /apps/federatedfilesharing/tests | |
parent | f43c2b45d8177e8c924b8f97f80c92164a3d5412 (diff) |
Allow to get a local cloud id without going through the contacts manager
Signed-off-by: Julius Härtl <jus@bitgrid.net>
Diffstat (limited to 'apps/federatedfilesharing/tests')
3 files changed, 6 insertions, 3 deletions
diff --git a/apps/federatedfilesharing/tests/AddressHandlerTest.php b/apps/federatedfilesharing/tests/AddressHandlerTest.php index f21d29ebd7e..13030e73cb0 100644 --- a/apps/federatedfilesharing/tests/AddressHandlerTest.php +++ b/apps/federatedfilesharing/tests/AddressHandlerTest.php @@ -32,6 +32,7 @@ use OCA\FederatedFileSharing\AddressHandler; use OCP\Contacts\IManager; use OCP\IL10N; use OCP\IURLGenerator; +use OCP\IUserManager; class AddressHandlerTest extends \Test\TestCase { /** @var IManager|\PHPUnit\Framework\MockObject\MockObject */ @@ -59,7 +60,7 @@ class AddressHandlerTest extends \Test\TestCase { $this->contactsManager = $this->createMock(IManager::class); - $this->cloudIdManager = new CloudIdManager($this->contactsManager); + $this->cloudIdManager = new CloudIdManager($this->contactsManager, $this->urlGenerator, $this->createMock(IUserManager::class)); $this->addressHandler = new AddressHandler($this->urlGenerator, $this->il10n, $this->cloudIdManager); } diff --git a/apps/federatedfilesharing/tests/Controller/MountPublicLinkControllerTest.php b/apps/federatedfilesharing/tests/Controller/MountPublicLinkControllerTest.php index d3a87a4c416..ff979c23d2a 100644 --- a/apps/federatedfilesharing/tests/Controller/MountPublicLinkControllerTest.php +++ b/apps/federatedfilesharing/tests/Controller/MountPublicLinkControllerTest.php @@ -41,6 +41,7 @@ use OCP\Http\Client\IClientService; use OCP\IL10N; use OCP\IRequest; use OCP\ISession; +use OCP\IURLGenerator; use OCP\IUserManager; use OCP\IUserSession; use OCP\Share\IManager; @@ -106,7 +107,7 @@ class MountPublicLinkControllerTest extends \Test\TestCase { $this->userSession = $this->getMockBuilder(IUserSession::class)->disableOriginalConstructor()->getMock(); $this->clientService = $this->getMockBuilder('OCP\Http\Client\IClientService')->disableOriginalConstructor()->getMock(); $this->contactsManager = $this->createMock(IContactsManager::class); - $this->cloudIdManager = new CloudIdManager($this->contactsManager); + $this->cloudIdManager = new CloudIdManager($this->contactsManager, $this->createMock(IURLGenerator::class), $this->userManager); $this->controller = new MountPublicLinkController( 'federatedfilesharing', $this->request, diff --git a/apps/federatedfilesharing/tests/FederatedShareProviderTest.php b/apps/federatedfilesharing/tests/FederatedShareProviderTest.php index a3253323769..831b9b59b54 100644 --- a/apps/federatedfilesharing/tests/FederatedShareProviderTest.php +++ b/apps/federatedfilesharing/tests/FederatedShareProviderTest.php @@ -46,6 +46,7 @@ use OCP\IConfig; use OCP\IDBConnection; use OCP\IL10N; use OCP\ILogger; +use OCP\IURLGenerator; use OCP\IUserManager; use OCP\Share\IManager; use OCP\Share\IShare; @@ -115,7 +116,7 @@ class FederatedShareProviderTest extends \Test\TestCase { //$this->addressHandler = new AddressHandler(\OC::$server->getURLGenerator(), $this->l); $this->addressHandler = $this->getMockBuilder('OCA\FederatedFileSharing\AddressHandler')->disableOriginalConstructor()->getMock(); $this->contactsManager = $this->createMock(IContactsManager::class); - $this->cloudIdManager = new CloudIdManager($this->contactsManager); + $this->cloudIdManager = new CloudIdManager($this->contactsManager, $this->createMock(IURLGenerator::class), $this->userManager); $this->gsConfig = $this->createMock(\OCP\GlobalScale\IConfig::class); $this->userManager->expects($this->any())->method('userExists')->willReturn(true); |