Replace ContactsManager
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
This commit is contained in:
parent
7785c3752f
commit
b93d26a209
1 changed files with 15 additions and 1 deletions
|
@ -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);
|
||||
|
|
Loading…
Reference in a new issue