Fix tests
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
This commit is contained in:
parent
7ce520e83e
commit
79a88ed458
|
@ -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));
|
||||
|
||||
|
|
Loading…
Reference in New Issue