77 */
88namespace OCA \Files_Sharing \Tests \Controller ;
99
10+ use OCA \FederatedFileSharing \FederatedShareProvider ;
1011use OCA \Files_Sharing \Controller \ShareesAPIController ;
1112use OCA \Files_Sharing \Tests \TestCase ;
1213use OCP \AppFramework \Http \DataResponse ;
@@ -46,6 +47,9 @@ class ShareesAPIControllerTest extends TestCase {
4647 /** @var IConfig|MockObject */
4748 protected $ config ;
4849
50+ /** @var FederatedShareProvider|MockObject */
51+ protected $ federatedShareProvider ;
52+
4953 protected function setUp (): void {
5054 parent ::setUp ();
5155
@@ -58,6 +62,7 @@ protected function setUp(): void {
5862 $ urlGeneratorMock = $ this ->createMock (IURLGenerator::class);
5963
6064 $ this ->collaboratorSearch = $ this ->createMock (ISearch::class);
65+ $ this ->federatedShareProvider = $ this ->createMock (FederatedShareProvider::class);
6166
6267 $ this ->sharees = new ShareesAPIController (
6368 'files_sharing ' ,
@@ -66,7 +71,8 @@ protected function setUp(): void {
6671 $ this ->config ,
6772 $ urlGeneratorMock ,
6873 $ this ->shareManager ,
69- $ this ->collaboratorSearch
74+ $ this ->collaboratorSearch ,
75+ $ this ->federatedShareProvider
7076 );
7177 }
7278
@@ -260,7 +266,8 @@ public function testSearch(
260266 $ config ,
261267 $ urlGenerator ,
262268 $ this ->shareManager ,
263- $ this ->collaboratorSearch
269+ $ this ->collaboratorSearch ,
270+ $ this ->federatedShareProvider
264271 ])
265272 ->onlyMethods (['isRemoteSharingAllowed ' , 'isRemoteGroupSharingAllowed ' ])
266273 ->getMock ();
@@ -359,7 +366,8 @@ public function testSearchInvalid($getData, $message): void {
359366 $ config ,
360367 $ urlGenerator ,
361368 $ this ->shareManager ,
362- $ this ->collaboratorSearch
369+ $ this ->collaboratorSearch ,
370+ $ this ->federatedShareProvider
363371 ])
364372 ->onlyMethods (['isRemoteSharingAllowed ' ])
365373 ->getMock ();
0 commit comments