3030use OCP \Files \File ;
3131use OCP \Files \Folder ;
3232use OCP \Files \IRootFolder ;
33+ use OCP \IConfig ;
3334use OCP \IDBConnection ;
3435use OCP \IGroup ;
3536use OCP \IGroupManager ;
@@ -98,6 +99,7 @@ protected function setUp(): void {
9899 $ this ->urlGenerator = $ this ->createMock (IURLGenerator::class);
99100 $ this ->timeFactory = $ this ->createMock (ITimeFactory::class);
100101 $ this ->shareManager = $ this ->createMock (IShareManager::class);
102+ $ this ->config = $ this ->createMock (IConfig::class);
101103
102104 $ this ->userManager ->expects ($ this ->any ())->method ('userExists ' )->willReturn (true );
103105 $ this ->timeFactory ->expects ($ this ->any ())->method ('now ' )->willReturn (new \DateTimeImmutable ("2023-05-04 00:00 Europe/Berlin " ));
@@ -116,6 +118,7 @@ protected function setUp(): void {
116118 $ this ->urlGenerator ,
117119 $ this ->timeFactory ,
118120 $ this ->shareManager ,
121+ $ this ->config ,
119122 );
120123 }
121124
@@ -478,6 +481,7 @@ public function testDeleteSingleShare() {
478481 $ this ->urlGenerator ,
479482 $ this ->timeFactory ,
480483 $ this ->shareManager ,
484+ $ this ->config ,
481485 ])
482486 ->setMethods (['getShareById ' ])
483487 ->getMock ();
@@ -574,6 +578,7 @@ public function testDeleteGroupShareWithUserGroupShares() {
574578 $ this ->urlGenerator ,
575579 $ this ->timeFactory ,
576580 $ this ->shareManager ,
581+ $ this ->config ,
577582 ])
578583 ->setMethods (['getShareById ' ])
579584 ->getMock ();
@@ -2569,6 +2574,7 @@ public function testGetSharesInFolder() {
25692574 $ this ->urlGenerator ,
25702575 $ this ->timeFactory ,
25712576 $ this ->shareManager ,
2577+ $ this ->config ,
25722578 );
25732579
25742580 $ password = md5 (time ());
@@ -2668,6 +2674,7 @@ public function testGetAccessListNoCurrentAccessRequired() {
26682674 $ this ->urlGenerator ,
26692675 $ this ->timeFactory ,
26702676 $ this ->shareManager ,
2677+ $ this ->config ,
26712678 );
26722679
26732680 $ u1 = $ userManager ->createUser ('testShare1 ' , 'test ' );
@@ -2770,6 +2777,7 @@ public function testGetAccessListCurrentAccessRequired() {
27702777 $ this ->urlGenerator ,
27712778 $ this ->timeFactory ,
27722779 $ this ->shareManager ,
2780+ $ this ->config ,
27732781 );
27742782
27752783 $ u1 = $ userManager ->createUser ('testShare1 ' , 'test ' );
0 commit comments