diff options
Diffstat (limited to 'tests/lib/Config/UserConfigTest.php')
-rw-r--r-- | tests/lib/Config/UserConfigTest.php | 120 |
1 files changed, 30 insertions, 90 deletions
diff --git a/tests/lib/Config/UserConfigTest.php b/tests/lib/Config/UserConfigTest.php index 09d19964249..2c8222576c4 100644 --- a/tests/lib/Config/UserConfigTest.php +++ b/tests/lib/Config/UserConfigTest.php @@ -348,9 +348,7 @@ class UserConfigTest extends TestCase { ]; } - /** - * @dataProvider providerHasKey - */ + #[\PHPUnit\Framework\Attributes\DataProvider('providerHasKey')] public function testHasKey(string $userId, string $appId, string $key, ?bool $lazy, bool $result): void { $userConfig = $this->generateUserConfig(); $this->assertEquals($result, $userConfig->hasKey($userId, $appId, $key, $lazy)); @@ -375,9 +373,7 @@ class UserConfigTest extends TestCase { ]; } - /** - * @dataProvider providerIsSensitive - */ + #[\PHPUnit\Framework\Attributes\DataProvider('providerIsSensitive')] public function testIsSensitive( string $userId, string $appId, @@ -406,9 +402,7 @@ class UserConfigTest extends TestCase { ]; } - /** - * @dataProvider providerIsLazy - */ + #[\PHPUnit\Framework\Attributes\DataProvider('providerIsLazy')] public function testIsLazy( string $userId, string $appId, @@ -541,9 +535,7 @@ class UserConfigTest extends TestCase { ]; } - /** - * @dataProvider providerGetValues - */ + #[\PHPUnit\Framework\Attributes\DataProvider('providerGetValues')] public function testGetValues( string $userId, string $appId, @@ -642,9 +634,7 @@ class UserConfigTest extends TestCase { ]; } - /** - * @dataProvider providerGetAllValues - */ + #[\PHPUnit\Framework\Attributes\DataProvider('providerGetAllValues')] public function testGetAllValues( string $userId, bool $filtered, @@ -686,9 +676,7 @@ class UserConfigTest extends TestCase { ]; } - /** - * @dataProvider providerSearchValuesByApps - */ + #[\PHPUnit\Framework\Attributes\DataProvider('providerSearchValuesByApps')] public function testSearchValuesByApps( string $userId, string $key, @@ -736,9 +724,7 @@ class UserConfigTest extends TestCase { ]; } - /** - * @dataProvider providerSearchValuesByUsers - */ + #[\PHPUnit\Framework\Attributes\DataProvider('providerSearchValuesByUsers')] public function testSearchValuesByUsers( string $app, string $key, @@ -760,9 +746,7 @@ class UserConfigTest extends TestCase { ]; } - /** - * @dataProvider providerSearchValuesByValueString - */ + #[\PHPUnit\Framework\Attributes\DataProvider('providerSearchValuesByValueString')] public function testSearchUsersByValueString( string $app, string $key, @@ -782,9 +766,7 @@ class UserConfigTest extends TestCase { ]; } - /** - * @dataProvider providerSearchValuesByValueInt - */ + #[\PHPUnit\Framework\Attributes\DataProvider('providerSearchValuesByValueInt')] public function testSearchUsersByValueInt( string $app, string $key, @@ -802,9 +784,7 @@ class UserConfigTest extends TestCase { ]; } - /** - * @dataProvider providerSearchValuesByValues - */ + #[\PHPUnit\Framework\Attributes\DataProvider('providerSearchValuesByValues')] public function testSearchUsersByValues( string $app, string $key, @@ -822,9 +802,7 @@ class UserConfigTest extends TestCase { ]; } - /** - * @dataProvider providerSearchValuesByValueBool - */ + #[\PHPUnit\Framework\Attributes\DataProvider('providerSearchValuesByValueBool')] public function testSearchUsersByValueBool( string $app, string $key, @@ -903,9 +881,7 @@ class UserConfigTest extends TestCase { ]; } - /** - * @dataProvider providerGetValueMixed - */ + #[\PHPUnit\Framework\Attributes\DataProvider('providerGetValueMixed')] public function testGetValueMixed( ?array $preload, string $userId, @@ -919,9 +895,7 @@ class UserConfigTest extends TestCase { $this->assertEquals($result, $userConfig->getValueMixed($userId, $app, $key, $default, $lazy)); } - /** - * @dataProvider providerGetValueMixed - */ + #[\PHPUnit\Framework\Attributes\DataProvider('providerGetValueMixed')] public function testGetValueString( ?array $preload, string $userId, @@ -961,9 +935,7 @@ class UserConfigTest extends TestCase { ]; } - /** - * @dataProvider providerGetValueInt - */ + #[\PHPUnit\Framework\Attributes\DataProvider('providerGetValueInt')] public function testGetValueInt( ?array $preload, string $userId, @@ -1002,9 +974,7 @@ class UserConfigTest extends TestCase { ]; } - /** - * @dataProvider providerGetValueFloat - */ + #[\PHPUnit\Framework\Attributes\DataProvider('providerGetValueFloat')] public function testGetValueFloat( ?array $preload, string $userId, @@ -1063,9 +1033,7 @@ class UserConfigTest extends TestCase { ]; } - /** - * @dataProvider providerGetValueBool - */ + #[\PHPUnit\Framework\Attributes\DataProvider('providerGetValueBool')] public function testGetValueBool( ?array $preload, string $userId, @@ -1100,9 +1068,7 @@ class UserConfigTest extends TestCase { ]; } - /** - * @dataProvider providerGetValueArray - */ + #[\PHPUnit\Framework\Attributes\DataProvider('providerGetValueArray')] public function testGetValueArray( ?array $preload, string $userId, @@ -1156,9 +1122,7 @@ class UserConfigTest extends TestCase { ]; } - /** - * @dataProvider providerGetValueType - */ + #[\PHPUnit\Framework\Attributes\DataProvider('providerGetValueType')] public function testGetValueType( ?array $preload, string $userId, @@ -1215,9 +1179,7 @@ class UserConfigTest extends TestCase { ]; } - /** - * @dataProvider providerSetValueMixed - */ + #[\PHPUnit\Framework\Attributes\DataProvider('providerSetValueMixed')] public function testSetValueMixed( ?array $preload, string $userId, @@ -1298,9 +1260,7 @@ class UserConfigTest extends TestCase { ]; } - /** - * @dataProvider providerSetValueString - */ + #[\PHPUnit\Framework\Attributes\DataProvider('providerSetValueString')] public function testSetValueString( ?array $preload, string $userId, @@ -1361,9 +1321,7 @@ class UserConfigTest extends TestCase { ]; } - /** - * @dataProvider providerSetValueInt - */ + #[\PHPUnit\Framework\Attributes\DataProvider('providerSetValueInt')] public function testSetValueInt( ?array $preload, string $userId, @@ -1424,9 +1382,7 @@ class UserConfigTest extends TestCase { ]; } - /** - * @dataProvider providerSetValueFloat - */ + #[\PHPUnit\Framework\Attributes\DataProvider('providerSetValueFloat')] public function testSetValueFloat( ?array $preload, string $userId, @@ -1488,9 +1444,7 @@ class UserConfigTest extends TestCase { ]; } - /** - * @dataProvider providerSetValueArray - */ + #[\PHPUnit\Framework\Attributes\DataProvider('providerSetValueArray')] public function testSetValueArray( ?array $preload, string $userId, @@ -1534,9 +1488,7 @@ class UserConfigTest extends TestCase { ]; } - /** - * @dataProvider providerUpdateSensitive - */ + #[\PHPUnit\Framework\Attributes\DataProvider('providerUpdateSensitive')] public function testUpdateSensitive( ?array $preload, string $userId, @@ -1575,9 +1527,7 @@ class UserConfigTest extends TestCase { return [[true], [false]]; } - /** - * @dataProvider providerUpdateGlobalSensitive - */ + #[\PHPUnit\Framework\Attributes\DataProvider('providerUpdateGlobalSensitive')] public function testUpdateGlobalSensitive(bool $sensitive): void { $userConfig = $this->generateUserConfig($preload ?? []); $app = 'app2'; @@ -1624,9 +1574,7 @@ class UserConfigTest extends TestCase { ]; } - /** - * @dataProvider providerUpdateLazy - */ + #[\PHPUnit\Framework\Attributes\DataProvider('providerUpdateLazy')] public function testUpdateLazy( ?array $preload, string $userId, @@ -1658,9 +1606,7 @@ class UserConfigTest extends TestCase { return [[true], [false]]; } - /** - * @dataProvider providerUpdateGlobalLazy - */ + #[\PHPUnit\Framework\Attributes\DataProvider('providerUpdateGlobalLazy')] public function testUpdateGlobalLazy(bool $lazy): void { $userConfig = $this->generateUserConfig($preload ?? []); $app = 'app2'; @@ -1728,9 +1674,7 @@ class UserConfigTest extends TestCase { ]; } - /** - * @dataProvider providerGetDetails - */ + #[\PHPUnit\Framework\Attributes\DataProvider('providerGetDetails')] public function testGetDetails(string $userId, string $app, string $key, array $result): void { $userConfig = $this->generateUserConfig($preload ?? []); $this->assertEqualsCanonicalizing($result, $userConfig->getDetails($userId, $app, $key)); @@ -1748,9 +1692,7 @@ class UserConfigTest extends TestCase { ]; } - /** - * @dataProvider providerDeletePreference - */ + #[\PHPUnit\Framework\Attributes\DataProvider('providerDeletePreference')] public function testDeletePreference( ?array $preload, string $userId, @@ -1779,9 +1721,7 @@ class UserConfigTest extends TestCase { ]; } - /** - * @dataProvider providerDeleteKey - */ + #[\PHPUnit\Framework\Attributes\DataProvider('providerDeleteKey')] public function testDeleteKey( ?array $preload, string $app, |