diff options
author | Roeland Jago Douma <roeland@famdouma.nl> | 2018-03-13 22:18:38 +0100 |
---|---|---|
committer | Roeland Jago Douma <roeland@famdouma.nl> | 2018-03-13 22:18:38 +0100 |
commit | b93d26a20975c2568bc47d9470dac522dffa80c1 (patch) | |
tree | 5262c7841f2876120145538fbc18504aa1850e8d /apps/files_sharing | |
parent | 7785c3752fbfef792cd33dc5da2ee63e8263b9fa (diff) | |
download | nextcloud-server-b93d26a20975c2568bc47d9470dac522dffa80c1.tar.gz nextcloud-server-b93d26a20975c2568bc47d9470dac522dffa80c1.zip |
Replace ContactsManager
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
Diffstat (limited to 'apps/files_sharing')
-rw-r--r-- | apps/files_sharing/tests/Controller/ShareAPIControllerTest.php | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/apps/files_sharing/tests/Controller/ShareAPIControllerTest.php b/apps/files_sharing/tests/Controller/ShareAPIControllerTest.php index a475474e3cf..4d944bfd58f 100644 --- a/apps/files_sharing/tests/Controller/ShareAPIControllerTest.php +++ b/apps/files_sharing/tests/Controller/ShareAPIControllerTest.php @@ -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); |