2020use OCP \Files \File ;
2121use OCP \Files \Folder ;
2222use OCP \Files \IRootFolder ;
23+ use OCP \IConfig ;
2324use OCP \IDBConnection ;
2425use OCP \IGroup ;
2526use OCP \IGroupManager ;
@@ -79,6 +80,8 @@ class DefaultShareProviderTest extends \Test\TestCase {
7980 /** @var LoggerInterface|MockObject */
8081 protected $ logger ;
8182
83+ protected IConfig &MockObject $ config ;
84+
8285 protected IShareManager &MockObject $ shareManager ;
8386
8487 protected function setUp (): void {
@@ -94,6 +97,7 @@ protected function setUp(): void {
9497 $ this ->timeFactory = $ this ->createMock (ITimeFactory::class);
9598 $ this ->logger = $ this ->createMock (LoggerInterface::class);
9699 $ this ->shareManager = $ this ->createMock (IShareManager::class);
100+ $ this ->config = $ this ->createMock (IConfig::class);
97101
98102 $ this ->userManager ->expects ($ this ->any ())->method ('userExists ' )->willReturn (true );
99103 $ this ->timeFactory ->expects ($ this ->any ())->method ('now ' )->willReturn (new \DateTimeImmutable ('2023-05-04 00:00 Europe/Berlin ' ));
@@ -113,6 +117,7 @@ protected function setUp(): void {
113117 $ this ->timeFactory ,
114118 $ this ->logger ,
115119 $ this ->shareManager ,
120+ $ this ->config ,
116121 );
117122 }
118123
@@ -477,6 +482,7 @@ public function testDeleteSingleShare(): void {
477482 $ this ->timeFactory ,
478483 $ this ->logger ,
479484 $ this ->shareManager ,
485+ $ this ->config ,
480486 ])
481487 ->onlyMethods (['getShareById ' ])
482488 ->getMock ();
@@ -574,6 +580,7 @@ public function testDeleteGroupShareWithUserGroupShares(): void {
574580 $ this ->timeFactory ,
575581 $ this ->logger ,
576582 $ this ->shareManager ,
583+ $ this ->config ,
577584 ])
578585 ->onlyMethods (['getShareById ' ])
579586 ->getMock ();
@@ -2566,6 +2573,7 @@ public function testGetSharesInFolder(): void {
25662573 $ this ->timeFactory ,
25672574 $ this ->logger ,
25682575 $ this ->shareManager ,
2576+ $ this ->config ,
25692577 );
25702578
25712579 $ password = md5 (time ());
@@ -2666,6 +2674,7 @@ public function testGetAccessListNoCurrentAccessRequired(): void {
26662674 $ this ->timeFactory ,
26672675 $ this ->logger ,
26682676 $ this ->shareManager ,
2677+ $ this ->config ,
26692678 );
26702679
26712680 $ u1 = $ userManager ->createUser ('testShare1 ' , 'test ' );
@@ -2769,6 +2778,7 @@ public function testGetAccessListCurrentAccessRequired(): void {
27692778 $ this ->timeFactory ,
27702779 $ this ->logger ,
27712780 $ this ->shareManager ,
2781+ $ this ->config ,
27722782 );
27732783
27742784 $ u1 = $ userManager ->createUser ('testShare1 ' , 'test ' );
0 commit comments