aboutsummaryrefslogtreecommitdiffstats
path: root/apps/settings/tests/Controller/UsersControllerTest.php
diff options
context:
space:
mode:
authorRobin Appelman <robin@icewind.nl>2025-06-30 16:56:59 +0200
committerRobin Appelman <robin@icewind.nl>2025-07-01 22:45:52 +0200
commitaa15f9d16d5b46d04763c7deedb129990e819364 (patch)
tree758e0aebcac34a545f9a21806120a9fcb96f4cb6 /apps/settings/tests/Controller/UsersControllerTest.php
parent1620a0c0510a42b1da0a66488838f1ce3ba1210d (diff)
downloadnextcloud-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/settings/tests/Controller/UsersControllerTest.php')
-rw-r--r--apps/settings/tests/Controller/UsersControllerTest.php24
1 files changed, 6 insertions, 18 deletions
diff --git a/apps/settings/tests/Controller/UsersControllerTest.php b/apps/settings/tests/Controller/UsersControllerTest.php
index d5fe38ad458..0468ce6814c 100644
--- a/apps/settings/tests/Controller/UsersControllerTest.php
+++ b/apps/settings/tests/Controller/UsersControllerTest.php
@@ -235,9 +235,7 @@ class UsersControllerTest extends \Test\TestCase {
return $account;
}
- /**
- * @dataProvider dataTestSetUserSettings
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('dataTestSetUserSettings')]
public function testSetUserSettings(string $email, bool $validEmail, int $expectedStatus): void {
$controller = $this->getController(false, ['saveUserSettings']);
$user = $this->createMock(IUser::class);
@@ -497,9 +495,7 @@ class UsersControllerTest extends \Test\TestCase {
);
}
- /**
- * @dataProvider dataTestSetUserSettingsSubset
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('dataTestSetUserSettingsSubset')]
public function testSetUserSettingsSubset(string $property, string $propertyValue): void {
$controller = $this->getController(false, ['saveUserSettings']);
$user = $this->createMock(IUser::class);
@@ -641,9 +637,7 @@ class UsersControllerTest extends \Test\TestCase {
];
}
- /**
- * @dataProvider dataTestSaveUserSettings
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('dataTestSaveUserSettings')]
public function testSaveUserSettings(array $data, ?string $oldEmailAddress, ?string $oldDisplayName): void {
$controller = $this->getController();
$user = $this->createMock(IUser::class);
@@ -758,9 +752,7 @@ class UsersControllerTest extends \Test\TestCase {
];
}
- /**
- * @dataProvider dataTestSaveUserSettingsException
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('dataTestSaveUserSettingsException')]
public function testSaveUserSettingsException(
array $data,
string $oldEmailAddress,
@@ -843,9 +835,7 @@ class UsersControllerTest extends \Test\TestCase {
];
}
- /**
- * @dataProvider dataTestGetVerificationCode
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('dataTestGetVerificationCode')]
public function testGetVerificationCode(string $account, string $type, array $dataBefore, array $expectedData, bool $onlyVerificationCode): void {
$message = 'Use my Federated Cloud ID to share with me: user@nextcloud.com';
$signature = 'theSignature';
@@ -940,9 +930,7 @@ class UsersControllerTest extends \Test\TestCase {
$this->assertSame(Http::STATUS_BAD_REQUEST, $result->getStatus());
}
- /**
- * @dataProvider dataTestCanAdminChangeUserPasswords
- */
+ #[\PHPUnit\Framework\Attributes\DataProvider('dataTestCanAdminChangeUserPasswords')]
public function testCanAdminChangeUserPasswords(
bool $encryptionEnabled,
bool $encryptionModuleLoaded,