1010use OCP \AppFramework \Http \TemplateResponse ;
1111use OCP \AppFramework \Services \IInitialState ;
1212use OCP \Constants ;
13+ use OCP \IAppConfig ;
1314use OCP \IConfig ;
1415use OCP \IL10N ;
1516use OCP \IURLGenerator ;
@@ -22,6 +23,8 @@ class SharingTest extends TestCase {
2223 private $ admin ;
2324 /** @var IConfig&MockObject */
2425 private $ config ;
26+ /** @var IAppConfig */
27+ private $ appConfig ;
2528 /** @var IL10N&MockObject */
2629 private $ l10n ;
2730 /** @var IManager|MockObject */
@@ -36,6 +39,7 @@ class SharingTest extends TestCase {
3639 protected function setUp (): void {
3740 parent ::setUp ();
3841 $ this ->config = $ this ->getMockBuilder (IConfig::class)->getMock ();
42+ $ this ->appConfig = $ this ->getMockBuilder (IAppConfig::class)->getMock ();
3943 $ this ->l10n = $ this ->getMockBuilder (IL10N ::class)->getMock ();
4044
4145 /** @var IManager|MockObject */
@@ -49,6 +53,7 @@ protected function setUp(): void {
4953
5054 $ this ->admin = new Sharing (
5155 $ this ->config ,
56+ $ this ->appConfig ,
5257 $ this ->l10n ,
5358 $ this ->shareManager ,
5459 $ this ->appManager ,
@@ -65,6 +70,7 @@ public function testGetFormWithoutExcludedGroups(): void {
6570 ['core ' , 'shareapi_exclude_groups_list ' , '' , '' ],
6671 ['core ' , 'shareapi_allow_links_exclude_groups ' , '' , '' ],
6772 ['core ' , 'shareapi_allow_group_sharing ' , 'yes ' , 'yes ' ],
73+ ['core ' , 'shareapi_groups_block_list ' , '[] ' , '[] ' ],
6874 ['core ' , 'shareapi_allow_links ' , 'yes ' , 'yes ' ],
6975 ['core ' , 'shareapi_allow_public_upload ' , 'yes ' , 'yes ' ],
7076 ['core ' , 'shareapi_allow_resharing ' , 'yes ' , 'yes ' ],
@@ -110,6 +116,7 @@ public function testGetFormWithoutExcludedGroups(): void {
110116 'sharingDocumentation ' => '' ,
111117 'sharingSettings ' => [
112118 'allowGroupSharing ' => true ,
119+ 'groupsBlockList ' => [],
113120 'allowLinks ' => true ,
114121 'allowPublicUpload ' => true ,
115122 'allowResharing ' => true ,
@@ -162,6 +169,7 @@ public function testGetFormWithExcludedGroups(): void {
162169 ['core ' , 'shareapi_exclude_groups_list ' , '' , '["NoSharers","OtherNoSharers"] ' ],
163170 ['core ' , 'shareapi_allow_links_exclude_groups ' , '' , '' ],
164171 ['core ' , 'shareapi_allow_group_sharing ' , 'yes ' , 'yes ' ],
172+ ['core ' , 'shareapi_groups_block_list ' , '[] ' , '[] ' ],
165173 ['core ' , 'shareapi_allow_links ' , 'yes ' , 'yes ' ],
166174 ['core ' , 'shareapi_allow_public_upload ' , 'yes ' , 'yes ' ],
167175 ['core ' , 'shareapi_allow_resharing ' , 'yes ' , 'yes ' ],
@@ -207,6 +215,7 @@ public function testGetFormWithExcludedGroups(): void {
207215 'sharingDocumentation ' => '' ,
208216 'sharingSettings ' => [
209217 'allowGroupSharing ' => true ,
218+ 'groupsBlockList ' => [],
210219 'allowLinks ' => true ,
211220 'allowPublicUpload ' => true ,
212221 'allowResharing ' => true ,
0 commit comments