Fix federatedshareprovidertest

Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
This commit is contained in:
Roeland Jago Douma 2018-01-16 19:24:52 +01:00
parent 50acde36b7
commit fde1ada916
No known key found for this signature in database
GPG Key ID: F941078878347C0C
1 changed files with 18 additions and 0 deletions

View File

@ -490,6 +490,9 @@ class FederatedShareProviderTest extends \Test\TestCase {
$this->addressHandler->expects($this->at(1))->method('splitUserRemote') $this->addressHandler->expects($this->at(1))->method('splitUserRemote')
->willReturn(['user2', 'server.com']); ->willReturn(['user2', 'server.com']);
$this->addressHandler->method('generateRemoteURL')
->willReturn('remoteurl.com');
$this->tokenHandler->method('generateToken')->willReturn('token'); $this->tokenHandler->method('generateToken')->willReturn('token');
$this->notifications $this->notifications
->method('sendRemoteShare') ->method('sendRemoteShare')
@ -532,6 +535,9 @@ class FederatedShareProviderTest extends \Test\TestCase {
$this->rootFolder->expects($this->never())->method($this->anything()); $this->rootFolder->expects($this->never())->method($this->anything());
$this->addressHandler->method('generateRemoteURL')
->willReturn('remoteurl.com');
$share = $this->shareManager->newShare(); $share = $this->shareManager->newShare();
$share->setSharedWith('user@server.com') $share->setSharedWith('user@server.com')
->setSharedBy('sharedBy') ->setSharedBy('sharedBy')
@ -570,6 +576,9 @@ class FederatedShareProviderTest extends \Test\TestCase {
$this->rootFolder->expects($this->never())->method($this->anything()); $this->rootFolder->expects($this->never())->method($this->anything());
$this->addressHandler->method('generateRemoteURL')
->willReturn('remoteurl.com');
$share = $this->shareManager->newShare(); $share = $this->shareManager->newShare();
$share->setSharedWith('user@server.com') $share->setSharedWith('user@server.com')
->setSharedBy('shareOwner') ->setSharedBy('shareOwner')
@ -611,6 +620,9 @@ class FederatedShareProviderTest extends \Test\TestCase {
$this->rootFolder->expects($this->never())->method($this->anything()); $this->rootFolder->expects($this->never())->method($this->anything());
$this->addressHandler->method('generateRemoteURL')
->willReturn('remoteurl.com');
$share = $this->shareManager->newShare(); $share = $this->shareManager->newShare();
$share->setSharedWith('user@server.com') $share->setSharedWith('user@server.com')
->setSharedBy('sharedBy') ->setSharedBy('sharedBy')
@ -806,6 +818,9 @@ class FederatedShareProviderTest extends \Test\TestCase {
->method('sendRemoteShare') ->method('sendRemoteShare')
->willReturn(true); ->willReturn(true);
$this->addressHandler->method('generateRemoteURL')
->willReturn('remoteurl.com');
$share1 = $this->shareManager->newShare(); $share1 = $this->shareManager->newShare();
$share1->setSharedWith('user@server.com') $share1->setSharedWith('user@server.com')
->setSharedBy($u1->getUID()) ->setSharedBy($u1->getUID())
@ -857,6 +872,9 @@ class FederatedShareProviderTest extends \Test\TestCase {
$result = $this->provider->getAccessList([$file1], false); $result = $this->provider->getAccessList([$file1], false);
$this->assertEquals(['remote' => false], $result); $this->assertEquals(['remote' => false], $result);
$this->addressHandler->method('generateRemoteURL')
->willReturn('remoteurl.com');
$share1 = $this->shareManager->newShare(); $share1 = $this->shareManager->newShare();
$share1->setSharedWith('user@server.com') $share1->setSharedWith('user@server.com')
->setSharedBy($u1->getUID()) ->setSharedBy($u1->getUID())