Replace ContactsManager

Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
This commit is contained in:
Roeland Jago Douma 2018-03-13 22:18:38 +01:00
parent 7785c3752f
commit b93d26a209
No known key found for this signature in database
GPG key ID: F941078878347C0C

View file

@ -2068,7 +2068,7 @@ class ShareAPIControllerTest extends TestCase {
'file_parent' => 1,
'file_target' => 'myTarget',
'share_with' => 'user@server.com',
'share_with_displayname' => 'user@server.com',
'share_with_displayname' => 'foobar',
'mail_send' => 0,
'mimetype' => 'myFolderMimeType',
], $share, [], false
@ -2127,6 +2127,20 @@ class ShareAPIControllerTest extends TestCase {
->will($this->returnArgument(0));
}
$cm = $this->createMock(\OCP\Contacts\IManager::class);
$this->overwriteService(\OCP\Contacts\IManager::class, $cm);
$cm->method('search')
->with('user@server.com', ['CLOUD'])
->willReturn([
[
'CLOUD' => [
'user@server.com',
],
'FN' => 'foobar',
],
]);
try {
$result = $this->invokePrivate($this->ocs, 'formatShare', [$share]);
$this->assertFalse($exception);