diff options
author | Robin Appelman <robin@icewind.nl> | 2025-06-30 16:56:59 +0200 |
---|---|---|
committer | Robin Appelman <robin@icewind.nl> | 2025-07-01 22:45:52 +0200 |
commit | aa15f9d16d5b46d04763c7deedb129990e819364 (patch) | |
tree | 758e0aebcac34a545f9a21806120a9fcb96f4cb6 /apps/provisioning_api/tests/Controller/AppConfigControllerTest.php | |
parent | 1620a0c0510a42b1da0a66488838f1ce3ba1210d (diff) | |
download | nextcloud-server-rector-phpunit10.tar.gz nextcloud-server-rector-phpunit10.zip |
chore: run rectorrector-phpunit10
Signed-off-by: Robin Appelman <robin@icewind.nl>
Diffstat (limited to 'apps/provisioning_api/tests/Controller/AppConfigControllerTest.php')
-rw-r--r-- | apps/provisioning_api/tests/Controller/AppConfigControllerTest.php | 28 |
1 files changed, 7 insertions, 21 deletions
diff --git a/apps/provisioning_api/tests/Controller/AppConfigControllerTest.php b/apps/provisioning_api/tests/Controller/AppConfigControllerTest.php index 3d2c1645d25..1b09838cbc3 100644 --- a/apps/provisioning_api/tests/Controller/AppConfigControllerTest.php +++ b/apps/provisioning_api/tests/Controller/AppConfigControllerTest.php @@ -103,9 +103,7 @@ class AppConfigControllerTest extends TestCase { ]; } - /** - * @dataProvider dataGetKeys - */ + #[\PHPUnit\Framework\Attributes\DataProvider('dataGetKeys')] public function testGetKeys(string $app, ?array $keys, ?\Throwable $throws, int $status): void { $api = $this->getInstance(['verifyAppId']); if ($throws instanceof \Exception) { @@ -144,9 +142,7 @@ class AppConfigControllerTest extends TestCase { ]; } - /** - * @dataProvider dataGetValue - */ + #[\PHPUnit\Framework\Attributes\DataProvider('dataGetValue')] public function testGetValue(string $app, string $key, string $default, ?string $return, ?\Throwable $throws, int $status): void { $api = $this->getInstance(['verifyAppId']); if ($throws instanceof \Exception) { @@ -190,9 +186,7 @@ class AppConfigControllerTest extends TestCase { ]; } - /** - * @dataProvider dataSetValue - */ + #[\PHPUnit\Framework\Attributes\DataProvider('dataSetValue')] public function testSetValue(string $app, string $key, string $value, ?\Throwable $appThrows, ?\Throwable $keyThrows, int $status, int|\Throwable $type = IAppConfig::VALUE_MIXED): void { $adminUser = $this->createMock(IUser::class); $adminUser->expects($this->once()) @@ -290,9 +284,7 @@ class AppConfigControllerTest extends TestCase { ]; } - /** - * @dataProvider dataDeleteValue - */ + #[\PHPUnit\Framework\Attributes\DataProvider('dataDeleteValue')] public function testDeleteValue(string $app, string $key, ?\Throwable $appThrows, ?\Throwable $keyThrows, int $status): void { $api = $this->getInstance(['verifyAppId', 'verifyConfigKey']); if ($appThrows instanceof \Exception) { @@ -356,9 +348,7 @@ class AppConfigControllerTest extends TestCase { ]; } - /** - * @dataProvider dataVerifyAppIdThrows - */ + #[\PHPUnit\Framework\Attributes\DataProvider('dataVerifyAppIdThrows')] public function testVerifyAppIdThrows(string $app): void { $this->expectException(\InvalidArgumentException::class); @@ -375,9 +365,7 @@ class AppConfigControllerTest extends TestCase { ]; } - /** - * @dataProvider dataVerifyConfigKey - */ + #[\PHPUnit\Framework\Attributes\DataProvider('dataVerifyConfigKey')] public function testVerifyConfigKey(string $app, string $key, string $value): void { $api = $this->getInstance(); $this->invokePrivate($api, 'verifyConfigKey', [$app, $key, $value]); @@ -398,9 +386,7 @@ class AppConfigControllerTest extends TestCase { ]; } - /** - * @dataProvider dataVerifyConfigKeyThrows - */ + #[\PHPUnit\Framework\Attributes\DataProvider('dataVerifyConfigKeyThrows')] public function testVerifyConfigKeyThrows(string $app, string $key, string $value): void { $this->expectException(\InvalidArgumentException::class); |