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.php25
1 files changed, 10 insertions, 15 deletions
diff --git a/apps/twofactor_backupcodes/tests/Unit/Notification/NotifierTest.php b/apps/twofactor_backupcodes/tests/Unit/Notification/NotifierTest.php
index 87aca38ba73..b091d57dbd2 100644
--- a/apps/twofactor_backupcodes/tests/Unit/Notification/NotifierTest.php
+++ b/apps/twofactor_backupcodes/tests/Unit/Notification/NotifierTest.php
@@ -17,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();
@@ -49,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')
@@ -64,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')
@@ -79,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())