2121use OCP \Files \Mount \IShareOwnerlessMount ;
2222use OCP \Files \NotFoundException ;
2323use OCP \Files \Storage \IStorage ;
24+ use OCP \IAppConfig ;
2425use OCP \IConfig ;
2526use OCP \IDateTimeZone ;
2627use OCP \IGroup ;
@@ -70,6 +71,7 @@ class ShareAPIControllerTest extends TestCase {
7071 private IURLGenerator &MockObject $ urlGenerator ;
7172 private IL10N &MockObject $ l ;
7273 private IConfig &MockObject $ config ;
74+ private IAppConfig &MockObject $ appConfig ;
7375 private IAppManager &MockObject $ appManager ;
7476 private ContainerInterface &MockObject $ serverContainer ;
7577 private IUserStatusManager &MockObject $ userStatusManager ;
@@ -102,6 +104,7 @@ protected function setUp(): void {
102104 return vsprintf ($ text , $ parameters );
103105 });
104106 $ this ->config = $ this ->createMock (IConfig::class);
107+ $ this ->appConfig = $ this ->createMock (IAppConfig::class);
105108 $ this ->appManager = $ this ->createMock (IAppManager::class);
106109 $ this ->serverContainer = $ this ->createMock (ContainerInterface::class);
107110 $ this ->userStatusManager = $ this ->createMock (IUserStatusManager::class);
@@ -126,6 +129,7 @@ protected function setUp(): void {
126129 $ this ->urlGenerator ,
127130 $ this ->l ,
128131 $ this ->config ,
132+ $ this ->appConfig ,
129133 $ this ->appManager ,
130134 $ this ->serverContainer ,
131135 $ this ->userStatusManager ,
@@ -154,6 +158,7 @@ private function mockFormatShare() {
154158 $ this ->urlGenerator ,
155159 $ this ->l ,
156160 $ this ->config ,
161+ $ this ->appConfig ,
157162 $ this ->appManager ,
158163 $ this ->serverContainer ,
159164 $ this ->userStatusManager ,
@@ -839,6 +844,7 @@ public function testGetShare(IShare $share, array $result): void {
839844 $ this ->urlGenerator ,
840845 $ this ->l ,
841846 $ this ->config ,
847+ $ this ->appConfig ,
842848 $ this ->appManager ,
843849 $ this ->serverContainer ,
844850 $ this ->userStatusManager ,
@@ -1472,6 +1478,7 @@ public function testGetShares(array $getSharesParameters, array $shares, array $
14721478 $ this ->urlGenerator ,
14731479 $ this ->l ,
14741480 $ this ->config ,
1481+ $ this ->appConfig ,
14751482 $ this ->appManager ,
14761483 $ this ->serverContainer ,
14771484 $ this ->userStatusManager ,
@@ -1815,6 +1822,7 @@ public function testCreateShareUser(): void {
18151822 $ this ->urlGenerator ,
18161823 $ this ->l ,
18171824 $ this ->config ,
1825+ $ this ->appConfig ,
18181826 $ this ->appManager ,
18191827 $ this ->serverContainer ,
18201828 $ this ->userStatusManager ,
@@ -1913,6 +1921,7 @@ public function testCreateShareGroup(): void {
19131921 $ this ->urlGenerator ,
19141922 $ this ->l ,
19151923 $ this ->config ,
1924+ $ this ->appConfig ,
19161925 $ this ->appManager ,
19171926 $ this ->serverContainer ,
19181927 $ this ->userStatusManager ,
@@ -2339,6 +2348,7 @@ public function testCreateShareRemote(): void {
23392348 $ this ->urlGenerator ,
23402349 $ this ->l ,
23412350 $ this ->config ,
2351+ $ this ->appConfig ,
23422352 $ this ->appManager ,
23432353 $ this ->serverContainer ,
23442354 $ this ->userStatusManager ,
@@ -2410,6 +2420,7 @@ public function testCreateShareRemoteGroup(): void {
24102420 $ this ->urlGenerator ,
24112421 $ this ->l ,
24122422 $ this ->config ,
2423+ $ this ->appConfig ,
24132424 $ this ->appManager ,
24142425 $ this ->serverContainer ,
24152426 $ this ->userStatusManager ,
@@ -2642,6 +2653,7 @@ public function testCreateReshareOfFederatedMountNoDeletePermissions(): void {
26422653 $ this ->urlGenerator ,
26432654 $ this ->l ,
26442655 $ this ->config ,
2656+ $ this ->appConfig ,
26452657 $ this ->appManager ,
26462658 $ this ->serverContainer ,
26472659 $ this ->userStatusManager ,
0 commit comments