diff options
author | Roeland Jago Douma <roeland@famdouma.nl> | 2018-08-24 18:20:04 +0200 |
---|---|---|
committer | Roeland Jago Douma <roeland@famdouma.nl> | 2018-08-24 18:20:04 +0200 |
commit | 79a88ed458cf42109ab4e018767d30eefddcfb67 (patch) | |
tree | c0a83d8051868a337f2fb215c03db738540f9355 /apps/files_sharing | |
parent | 7ce520e83e432fcff3909670158d9a3df1069527 (diff) | |
download | nextcloud-server-79a88ed458cf42109ab4e018767d30eefddcfb67.tar.gz nextcloud-server-79a88ed458cf42109ab4e018767d30eefddcfb67.zip |
Fix tests
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
Diffstat (limited to 'apps/files_sharing')
-rw-r--r-- | apps/files_sharing/tests/Controller/ShareesAPIControllerTest.php | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/apps/files_sharing/tests/Controller/ShareesAPIControllerTest.php b/apps/files_sharing/tests/Controller/ShareesAPIControllerTest.php index d8c706da03c..adfb72f550a 100644 --- a/apps/files_sharing/tests/Controller/ShareesAPIControllerTest.php +++ b/apps/files_sharing/tests/Controller/ShareesAPIControllerTest.php @@ -280,8 +280,13 @@ class ShareesAPIControllerTest extends TestCase { $this->shareManager->expects($this->any()) ->method('shareProviderExists') - ->with(\OCP\Share::SHARE_TYPE_EMAIL) - ->willReturn($emailSharingEnabled); + ->will($this->returnCallback(function($shareType) use ($emailSharingEnabled) { + if ($shareType === \OCP\Share::SHARE_TYPE_EMAIL) { + return $emailSharingEnabled; + } else { + return false; + } + })); $this->assertInstanceOf(Http\DataResponse::class, $sharees->search($search, $itemType, $page, $perPage, $shareType)); |