diff options
Diffstat (limited to 'tests/lib/GlobalScale/ConfigTest.php')
-rw-r--r-- | tests/lib/GlobalScale/ConfigTest.php | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/tests/lib/GlobalScale/ConfigTest.php b/tests/lib/GlobalScale/ConfigTest.php index aa001268ecd..447b5886ce3 100644 --- a/tests/lib/GlobalScale/ConfigTest.php +++ b/tests/lib/GlobalScale/ConfigTest.php @@ -1,4 +1,5 @@ <?php + /** * SPDX-FileCopyrightText: 2017 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later @@ -28,7 +29,7 @@ class ConfigTest extends TestCase { if (!empty($mockMethods)) { return $this->getMockBuilder(Config::class) ->setConstructorArgs([$this->config]) - ->setMethods($mockMethods) + ->onlyMethods($mockMethods) ->getMock(); } @@ -47,12 +48,12 @@ class ConfigTest extends TestCase { /** - * @dataProvider dataTestOnlyInternalFederation * * @param bool $gsEnabled * @param string $gsFederation * @param bool $expected */ + #[\PHPUnit\Framework\Attributes\DataProvider('dataTestOnlyInternalFederation')] public function testOnlyInternalFederation($gsEnabled, $gsFederation, $expected): void { $gsConfig = $this->getInstance(['isGlobalScaleEnabled']); @@ -64,7 +65,7 @@ class ConfigTest extends TestCase { $this->assertSame($expected, $gsConfig->onlyInternalFederation()); } - public function dataTestOnlyInternalFederation() { + public static function dataTestOnlyInternalFederation(): array { return [ [true, 'global', false], [true, 'internal', true], |