@@ -80,7 +80,7 @@ public function testSearchNoLookupServerURI(): void {
8080 ['gs.enabled ' , false ],
8181 ['has_internet_connection ' , true ],
8282 )->willReturnOnConsecutiveCalls (
83- false ,
83+ true ,
8484 true ,
8585 );
8686
@@ -145,7 +145,7 @@ public function testSearch(array $searchParams): void {
145145 ['gs.enabled ' , false ],
146146 ['has_internet_connection ' , true ],
147147 )->willReturnOnConsecutiveCalls (
148- false ,
148+ true ,
149149 true ,
150150 );
151151
@@ -199,7 +199,7 @@ public function testSearchEnableDisableLookupServer(array $searchParams, $GSEnab
199199 ->method ('getAppValue ' )
200200 ->with ('files_sharing ' , 'lookupServerEnabled ' , 'no ' )
201201 ->willReturn ($ LookupEnabled ? 'yes ' : 'no ' );
202- if ($ GSEnabled || $ LookupEnabled ) {
202+ if ($ GSEnabled ) {
203203 $ searchResult ->expects ($ this ->once ())
204204 ->method ('addResultSet ' )
205205 ->with ($ type , $ searchParams ['expectedResult ' ], []);
@@ -258,11 +258,13 @@ public function testSearchEnableDisableLookupServer(array $searchParams, $GSEnab
258258 }
259259
260260
261- public function testSearchLookupServerDisabled (): void {
262- $ this ->config ->expects ($ this ->once ())
263- ->method ('getAppValue ' )
264- ->with ('files_sharing ' , 'lookupServerEnabled ' , 'yes ' )
265- ->willReturn ('no ' );
261+ public function testSearchGSDisabled (): void {
262+ $ this ->config ->expects ($ this ->atLeastOnce ())
263+ ->method ('getSystemValueBool ' )
264+ ->willReturnMap ([
265+ ['has_internet_connection ' , true , true ],
266+ ['gs.enabled ' , false , false ],
267+ ]);
266268
267269 /** @var ISearchResult|MockObject $searchResult */
268270 $ searchResult = $ this ->createMock (ISearchResult::class);
@@ -381,7 +383,6 @@ public function dataSearchEnableDisableLookupServer() {
381383 'label ' => $ fedIDs [0 ],
382384 'value ' => [
383385 'shareType ' => IShare::TYPE_REMOTE ,
384- 'globalScale ' => false ,
385386 'shareWith ' => $ fedIDs [0 ]
386387 ],
387388 'extra ' => ['federationId ' => $ fedIDs [0 ]],
@@ -390,7 +391,6 @@ public function dataSearchEnableDisableLookupServer() {
390391 'label ' => $ fedIDs [1 ],
391392 'value ' => [
392393 'shareType ' => IShare::TYPE_REMOTE ,
393- 'globalScale ' => false ,
394394 'shareWith ' => $ fedIDs [1 ]
395395 ],
396396 'extra ' => ['federationId ' => $ fedIDs [1 ]],
@@ -399,7 +399,6 @@ public function dataSearchEnableDisableLookupServer() {
399399 'label ' => $ fedIDs [2 ],
400400 'value ' => [
401401 'shareType ' => IShare::TYPE_REMOTE ,
402- 'globalScale ' => false ,
403402 'shareWith ' => $ fedIDs [2 ]
404403 ],
405404 'extra ' => ['federationId ' => $ fedIDs [2 ]],
@@ -474,7 +473,7 @@ public function searchDataProvider() {
474473 'label ' => $ fedIDs [0 ],
475474 'value ' => [
476475 'shareType ' => IShare::TYPE_REMOTE ,
477- 'globalScale ' => false ,
476+ 'globalScale ' => true ,
478477 'shareWith ' => $ fedIDs [0 ]
479478 ],
480479 'extra ' => ['federationId ' => $ fedIDs [0 ]],
@@ -483,7 +482,7 @@ public function searchDataProvider() {
483482 'label ' => $ fedIDs [1 ],
484483 'value ' => [
485484 'shareType ' => IShare::TYPE_REMOTE ,
486- 'globalScale ' => false ,
485+ 'globalScale ' => true ,
487486 'shareWith ' => $ fedIDs [1 ]
488487 ],
489488 'extra ' => ['federationId ' => $ fedIDs [1 ]],
@@ -492,7 +491,7 @@ public function searchDataProvider() {
492491 'label ' => $ fedIDs [2 ],
493492 'value ' => [
494493 'shareType ' => IShare::TYPE_REMOTE ,
495- 'globalScale ' => false ,
494+ 'globalScale ' => true ,
496495 'shareWith ' => $ fedIDs [2 ]
497496 ],
498497 'extra ' => ['federationId ' => $ fedIDs [2 ]],
0 commit comments