From bec1de8a385991f8ecc6837c672ea43a0e3dc8cf Mon Sep 17 00:00:00 2001 From: Roeland Jago Douma Date: Thu, 4 Feb 2016 10:01:40 +0100 Subject: Update OCS Share API to use federated share provider --- apps/files_sharing/tests/api/share20ocstest.php | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) (limited to 'apps/files_sharing/tests') diff --git a/apps/files_sharing/tests/api/share20ocstest.php b/apps/files_sharing/tests/api/share20ocstest.php index 97abdca7ac3..e6a78134734 100644 --- a/apps/files_sharing/tests/api/share20ocstest.php +++ b/apps/files_sharing/tests/api/share20ocstest.php @@ -97,10 +97,15 @@ class Share20OCSTest extends \Test\TestCase { public function testDeleteShareShareNotFound() { $this->shareManager - ->expects($this->once()) + ->expects($this->exactly(2)) ->method('getShareById') - ->with('ocinternal:42') - ->will($this->throwException(new \OCP\Share\Exceptions\ShareNotFound())); + ->will($this->returnCallback(function($id) { + if ($id === 'ocinternal:42' || $id === 'ocFederatedSharing:42') { + throw new \OCP\Share\Exceptions\ShareNotFound(); + } else { + throw new \Exception(); + } + })); $expected = new \OC_OCS_Result(null, 404, 'wrong share ID, share doesn\'t exist.'); $this->assertEquals($expected, $this->ocs->deleteShare(42)); -- cgit v1.2.3