aboutsummaryrefslogtreecommitdiffstats
path: root/tests/Core/Command/TwoFactorAuth/EnableTest.php
diff options
context:
space:
mode:
Diffstat (limited to 'tests/Core/Command/TwoFactorAuth/EnableTest.php')
-rw-r--r--tests/Core/Command/TwoFactorAuth/EnableTest.php33
1 files changed, 8 insertions, 25 deletions
diff --git a/tests/Core/Command/TwoFactorAuth/EnableTest.php b/tests/Core/Command/TwoFactorAuth/EnableTest.php
index 0e26bcb9578..7c34d6692c5 100644
--- a/tests/Core/Command/TwoFactorAuth/EnableTest.php
+++ b/tests/Core/Command/TwoFactorAuth/EnableTest.php
@@ -3,25 +3,8 @@
declare(strict_types=1);
/**
- * @copyright 2018 Christoph Wurst <christoph@winzerhof-wurst.at>
- *
- * @author 2018 Christoph Wurst <christoph@winzerhof-wurst.at>
- *
- * @license GNU AGPL version 3 or any later version
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Affero General Public License as
- * published by the Free Software Foundation, either version 3 of the
- * License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Affero General Public License for more details.
- *
- * You should have received a copy of the GNU Affero General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
- *
+ * SPDX-FileCopyrightText: 2018 Nextcloud GmbH and Nextcloud contributors
+ * SPDX-License-Identifier: AGPL-3.0-or-later
*/
namespace Test\Core\Command\TwoFactorAuth;
@@ -54,7 +37,7 @@ class EnableTest extends TestCase {
$this->command = new CommandTester($cmd);
}
- public function testInvalidUID() {
+ public function testInvalidUID(): void {
$this->userManager->expects($this->once())
->method('get')
->with('nope')
@@ -66,10 +49,10 @@ class EnableTest extends TestCase {
]);
$this->assertEquals(1, $rc);
- $this->assertStringContainsString("Invalid UID", $this->command->getDisplay());
+ $this->assertStringContainsString('Invalid UID', $this->command->getDisplay());
}
- public function testEnableNotSupported() {
+ public function testEnableNotSupported(): void {
$user = $this->createMock(IUser::class);
$this->userManager->expects($this->once())
->method('get')
@@ -86,10 +69,10 @@ class EnableTest extends TestCase {
]);
$this->assertEquals(2, $rc);
- $this->assertStringContainsString("The provider does not support this operation", $this->command->getDisplay());
+ $this->assertStringContainsString('The provider does not support this operation', $this->command->getDisplay());
}
- public function testEnabled() {
+ public function testEnabled(): void {
$user = $this->createMock(IUser::class);
$this->userManager->expects($this->once())
->method('get')
@@ -106,6 +89,6 @@ class EnableTest extends TestCase {
]);
$this->assertEquals(0, $rc);
- $this->assertStringContainsString("Two-factor provider totp enabled for user belle", $this->command->getDisplay());
+ $this->assertStringContainsString('Two-factor provider totp enabled for user belle', $this->command->getDisplay());
}
}