diff options
author | Christoph Wurst <christoph@winzerhof-wurst.at> | 2024-09-15 22:32:31 +0200 |
---|---|---|
committer | Christoph Wurst <christoph@winzerhof-wurst.at> | 2024-09-15 22:32:31 +0200 |
commit | 49dd79eabb2b8902559a7a4e8f8fcad54f46b604 (patch) | |
tree | 2af18db46ba463368dc4461d7436fb69577923de /apps/settings/tests/Controller/UsersControllerTest.php | |
parent | 4281ce6fa1bb8235426099d720734d2394bec203 (diff) | |
download | nextcloud-server-49dd79eabb2b8902559a7a4e8f8fcad54f46b604.tar.gz nextcloud-server-49dd79eabb2b8902559a7a4e8f8fcad54f46b604.zip |
refactor: Add void return type to PHPUnit test methods
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
Diffstat (limited to 'apps/settings/tests/Controller/UsersControllerTest.php')
-rw-r--r-- | apps/settings/tests/Controller/UsersControllerTest.php | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/apps/settings/tests/Controller/UsersControllerTest.php b/apps/settings/tests/Controller/UsersControllerTest.php index e1407cb1b55..db346ab89f2 100644 --- a/apps/settings/tests/Controller/UsersControllerTest.php +++ b/apps/settings/tests/Controller/UsersControllerTest.php @@ -249,7 +249,7 @@ class UsersControllerTest extends \Test\TestCase { * @param bool $validEmail * @param $expectedStatus */ - public function testSetUserSettings($email, $validEmail, $expectedStatus) { + public function testSetUserSettings($email, $validEmail, $expectedStatus): void { $controller = $this->getController(false, ['saveUserSettings']); $user = $this->createMock(IUser::class); $user->method('getUID')->willReturn('johndoe'); @@ -303,7 +303,7 @@ class UsersControllerTest extends \Test\TestCase { ]; } - public function testSetUserSettingsWhenUserDisplayNameChangeNotAllowed() { + public function testSetUserSettingsWhenUserDisplayNameChangeNotAllowed(): void { $controller = $this->getController(false, ['saveUserSettings']); $avatarScope = IAccountManager::SCOPE_PUBLISHED; @@ -401,7 +401,7 @@ class UsersControllerTest extends \Test\TestCase { ); } - public function testSetUserSettingsWhenFederatedFilesharingNotEnabled() { + public function testSetUserSettingsWhenFederatedFilesharingNotEnabled(): void { $controller = $this->getController(false, ['saveUserSettings']); $user = $this->createMock(IUser::class); $user->method('getUID')->willReturn('johndoe'); @@ -488,7 +488,7 @@ class UsersControllerTest extends \Test\TestCase { * @param string $property * @param string $propertyValue */ - public function testSetUserSettingsSubset($property, $propertyValue) { + public function testSetUserSettingsSubset($property, $propertyValue): void { $controller = $this->getController(false, ['saveUserSettings']); $user = $this->createMock(IUser::class); $user->method('getUID')->willReturn('johndoe'); @@ -619,7 +619,7 @@ class UsersControllerTest extends \Test\TestCase { public function testSaveUserSettings($data, $oldEmailAddress, $oldDisplayName - ) { + ): void { $controller = $this->getController(); $user = $this->createMock(IUser::class); @@ -742,7 +742,7 @@ class UsersControllerTest extends \Test\TestCase { string $oldDisplayName, bool $setDisplayNameResult, bool $canChangeEmail - ) { + ): void { $this->expectException(ForbiddenException::class); $controller = $this->getController(); @@ -826,7 +826,7 @@ class UsersControllerTest extends \Test\TestCase { * * @dataProvider dataTestGetVerificationCode */ - public function testGetVerificationCode($account, $type, $dataBefore, $expectedData, $onlyVerificationCode) { + public function testGetVerificationCode($account, $type, $dataBefore, $expectedData, $onlyVerificationCode): void { $message = 'Use my Federated Cloud ID to share with me: user@nextcloud.com'; $signature = 'theSignature'; @@ -912,7 +912,7 @@ class UsersControllerTest extends \Test\TestCase { /** * test get verification code in case no valid user was given */ - public function testGetVerificationCodeInvalidUser() { + public function testGetVerificationCodeInvalidUser(): void { $controller = $this->getController(); $this->userSession->expects($this->once())->method('getUser')->willReturn(null); $result = $controller->getVerificationCode('account', false); @@ -931,7 +931,7 @@ class UsersControllerTest extends \Test\TestCase { public function testCanAdminChangeUserPasswords($encryptionEnabled, $encryptionModuleLoaded, $masterKeyEnabled, - $expected) { + $expected): void { $controller = $this->getController(); $this->encryptionManager->expects($this->any()) |