aboutsummaryrefslogtreecommitdiffstats
path: root/apps/federatedfilesharing
diff options
context:
space:
mode:
authorRoeland Jago Douma <roeland@famdouma.nl>2018-01-16 19:24:52 +0100
committerRoeland Jago Douma <roeland@famdouma.nl>2018-01-16 19:25:08 +0100
commitfde1ada916c092b2255b6e0eb736a66edfa78c41 (patch)
tree68a367c27b95e1777be076c03b80b7f56d0bac53 /apps/federatedfilesharing
parent50acde36b77f58f44f48725809143eaa27997988 (diff)
downloadnextcloud-server-fde1ada916c092b2255b6e0eb736a66edfa78c41.tar.gz
nextcloud-server-fde1ada916c092b2255b6e0eb736a66edfa78c41.zip
Fix federatedshareprovidertest
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
Diffstat (limited to 'apps/federatedfilesharing')
-rw-r--r--apps/federatedfilesharing/tests/FederatedShareProviderTest.php18
1 files changed, 18 insertions, 0 deletions
diff --git a/apps/federatedfilesharing/tests/FederatedShareProviderTest.php b/apps/federatedfilesharing/tests/FederatedShareProviderTest.php
index 0a6d95d9d9e..52266383b36 100644
--- a/apps/federatedfilesharing/tests/FederatedShareProviderTest.php
+++ b/apps/federatedfilesharing/tests/FederatedShareProviderTest.php
@@ -490,6 +490,9 @@ class FederatedShareProviderTest extends \Test\TestCase {
$this->addressHandler->expects($this->at(1))->method('splitUserRemote')
->willReturn(['user2', 'server.com']);
+ $this->addressHandler->method('generateRemoteURL')
+ ->willReturn('remoteurl.com');
+
$this->tokenHandler->method('generateToken')->willReturn('token');
$this->notifications
->method('sendRemoteShare')
@@ -532,6 +535,9 @@ class FederatedShareProviderTest extends \Test\TestCase {
$this->rootFolder->expects($this->never())->method($this->anything());
+ $this->addressHandler->method('generateRemoteURL')
+ ->willReturn('remoteurl.com');
+
$share = $this->shareManager->newShare();
$share->setSharedWith('user@server.com')
->setSharedBy('sharedBy')
@@ -570,6 +576,9 @@ class FederatedShareProviderTest extends \Test\TestCase {
$this->rootFolder->expects($this->never())->method($this->anything());
+ $this->addressHandler->method('generateRemoteURL')
+ ->willReturn('remoteurl.com');
+
$share = $this->shareManager->newShare();
$share->setSharedWith('user@server.com')
->setSharedBy('shareOwner')
@@ -611,6 +620,9 @@ class FederatedShareProviderTest extends \Test\TestCase {
$this->rootFolder->expects($this->never())->method($this->anything());
+ $this->addressHandler->method('generateRemoteURL')
+ ->willReturn('remoteurl.com');
+
$share = $this->shareManager->newShare();
$share->setSharedWith('user@server.com')
->setSharedBy('sharedBy')
@@ -806,6 +818,9 @@ class FederatedShareProviderTest extends \Test\TestCase {
->method('sendRemoteShare')
->willReturn(true);
+ $this->addressHandler->method('generateRemoteURL')
+ ->willReturn('remoteurl.com');
+
$share1 = $this->shareManager->newShare();
$share1->setSharedWith('user@server.com')
->setSharedBy($u1->getUID())
@@ -857,6 +872,9 @@ class FederatedShareProviderTest extends \Test\TestCase {
$result = $this->provider->getAccessList([$file1], false);
$this->assertEquals(['remote' => false], $result);
+ $this->addressHandler->method('generateRemoteURL')
+ ->willReturn('remoteurl.com');
+
$share1 = $this->shareManager->newShare();
$share1->setSharedWith('user@server.com')
->setSharedBy($u1->getUID())