aboutsummaryrefslogtreecommitdiffstats
path: root/apps/twofactor_backupcodes/tests/Unit/Notification
diff options
context:
space:
mode:
Diffstat (limited to 'apps/twofactor_backupcodes/tests/Unit/Notification')
-rw-r--r--apps/twofactor_backupcodes/tests/Unit/Notification/NotifierTest.php50
1 files changed, 12 insertions, 38 deletions
diff --git a/apps/twofactor_backupcodes/tests/Unit/Notification/NotifierTest.php b/apps/twofactor_backupcodes/tests/Unit/Notification/NotifierTest.php
index d70252b5fbc..b091d57dbd2 100644
--- a/apps/twofactor_backupcodes/tests/Unit/Notification/NotifierTest.php
+++ b/apps/twofactor_backupcodes/tests/Unit/Notification/NotifierTest.php
@@ -3,29 +3,8 @@
declare(strict_types=1);
/**
- * @copyright Copyright (c) 2018, Roeland Jago Douma <roeland@famdouma.nl>
- *
- * @author Christoph Wurst <christoph@winzerhof-wurst.at>
- * @author Jan-Christoph Borchardt <hey@jancborchardt.net>
- * @author Joas Schilling <coding@schilljs.com>
- * @author Morris Jobke <hey@morrisjobke.de>
- * @author Roeland Jago Douma <roeland@famdouma.nl>
- *
- * @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 OCA\TwoFactorBackupCodes\Tests\Unit\Notification;
@@ -38,15 +17,10 @@ use PHPUnit\Framework\MockObject\MockObject;
use Test\TestCase;
class NotifierTest extends TestCase {
- /** @var Notifier */
- protected $notifier;
-
- /** @var IFactory|MockObject */
- protected $factory;
- /** @var IURLGenerator|MockObject */
- protected $url;
- /** @var IL10N|MockObject */
- protected $l;
+ protected IFactory&MockObject $factory;
+ protected IURLGenerator&MockObject $url;
+ protected IL10N&MockObject $l;
+ protected Notifier $notifier;
protected function setUp(): void {
parent::setUp();
@@ -70,10 +44,10 @@ class NotifierTest extends TestCase {
}
- public function testPrepareWrongApp() {
+ public function testPrepareWrongApp(): void {
$this->expectException(\InvalidArgumentException::class);
- /** @var INotification|\PHPUnit\Framework\MockObject\MockObject $notification */
+ /** @var INotification|MockObject $notification */
$notification = $this->createMock(INotification::class);
$notification->expects($this->once())
->method('getApp')
@@ -85,10 +59,10 @@ class NotifierTest extends TestCase {
}
- public function testPrepareWrongSubject() {
+ public function testPrepareWrongSubject(): void {
$this->expectException(\InvalidArgumentException::class);
- /** @var INotification|\PHPUnit\Framework\MockObject\MockObject $notification */
+ /** @var INotification|MockObject $notification */
$notification = $this->createMock(INotification::class);
$notification->expects($this->once())
->method('getApp')
@@ -100,8 +74,8 @@ class NotifierTest extends TestCase {
$this->notifier->prepare($notification, 'en');
}
- public function testPrepare() {
- /** @var \OCP\Notification\INotification|\PHPUnit\Framework\MockObject\MockObject $notification */
+ public function testPrepare(): void {
+ /** @var INotification&MockObject $notification */
$notification = $this->createMock(INotification::class);
$notification->expects($this->once())