aboutsummaryrefslogtreecommitdiffstats
path: root/tests/Core/Command/TwoFactorAuth/StateTest.php
diff options
context:
space:
mode:
Diffstat (limited to 'tests/Core/Command/TwoFactorAuth/StateTest.php')
-rw-r--r--tests/Core/Command/TwoFactorAuth/StateTest.php33
1 files changed, 8 insertions, 25 deletions
diff --git a/tests/Core/Command/TwoFactorAuth/StateTest.php b/tests/Core/Command/TwoFactorAuth/StateTest.php
index bc683c11886..f4ca3c4e031 100644
--- a/tests/Core/Command/TwoFactorAuth/StateTest.php
+++ b/tests/Core/Command/TwoFactorAuth/StateTest.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 Core\Command\TwoFactorAuth;
@@ -54,16 +37,16 @@ class StateTest extends TestCase {
$this->cmd = new CommandTester($cmd);
}
- public function testWrongUID() {
+ public function testWrongUID(): void {
$this->cmd->execute([
'uid' => 'nope',
]);
$output = $this->cmd->getDisplay();
- $this->assertStringContainsString("Invalid UID", $output);
+ $this->assertStringContainsString('Invalid UID', $output);
}
- public function testStateNoProvidersActive() {
+ public function testStateNoProvidersActive(): void {
$user = $this->createMock(IUser::class);
$this->userManager->expects($this->once())
->method('get')
@@ -83,10 +66,10 @@ class StateTest extends TestCase {
]);
$output = $this->cmd->getDisplay();
- $this->assertStringContainsString("Two-factor authentication is not enabled for user eldora", $output);
+ $this->assertStringContainsString('Two-factor authentication is not enabled for user eldora', $output);
}
- public function testStateOneProviderActive() {
+ public function testStateOneProviderActive(): void {
$user = $this->createMock(IUser::class);
$this->userManager->expects($this->once())
->method('get')
@@ -106,6 +89,6 @@ class StateTest extends TestCase {
]);
$output = $this->cmd->getDisplay();
- $this->assertStringContainsString("Two-factor authentication is enabled for user mohamed", $output);
+ $this->assertStringContainsString('Two-factor authentication is enabled for user mohamed', $output);
}
}