aboutsummaryrefslogtreecommitdiffstats
path: root/apps/comments/tests/Unit/Notification/NotifierTest.php
diff options
context:
space:
mode:
Diffstat (limited to 'apps/comments/tests/Unit/Notification/NotifierTest.php')
-rw-r--r--apps/comments/tests/Unit/Notification/NotifierTest.php37
1 files changed, 14 insertions, 23 deletions
diff --git a/apps/comments/tests/Unit/Notification/NotifierTest.php b/apps/comments/tests/Unit/Notification/NotifierTest.php
index 87b87e646af..37cad0b43df 100644
--- a/apps/comments/tests/Unit/Notification/NotifierTest.php
+++ b/apps/comments/tests/Unit/Notification/NotifierTest.php
@@ -1,4 +1,7 @@
<?php
+
+declare(strict_types=1);
+
/**
* SPDX-FileCopyrightText: 2016 Nextcloud GmbH and Nextcloud contributors
* SPDX-License-Identifier: AGPL-3.0-or-later
@@ -23,26 +26,16 @@ use PHPUnit\Framework\MockObject\MockObject;
use Test\TestCase;
class NotifierTest extends TestCase {
- /** @var Notifier */
- protected $notifier;
- /** @var IFactory|MockObject */
- protected $l10nFactory;
- /** @var IL10N|MockObject */
- protected $l;
- /** @var IRootFolder|MockObject */
- protected $folder;
- /** @var ICommentsManager|MockObject */
- protected $commentsManager;
- /** @var IURLGenerator|MockObject */
- protected $url;
- /** @var IUserManager|MockObject */
- protected $userManager;
- /** @var INotification|MockObject */
- protected $notification;
- /** @var IComment|MockObject */
- protected $comment;
- /** @var string */
- protected $lc = 'tlh_KX';
+ protected IFactory&MockObject $l10nFactory;
+ protected IL10N&MockObject $l;
+ protected IRootFolder&MockObject $folder;
+ protected ICommentsManager&MockObject $commentsManager;
+ protected IURLGenerator&MockObject $url;
+ protected IUserManager&MockObject $userManager;
+ protected INotification&MockObject $notification;
+ protected IComment&MockObject $comment;
+ protected Notifier $notifier;
+ protected string $lc = 'tlh_KX';
protected function setUp(): void {
parent::setUp();
@@ -75,9 +68,8 @@ class NotifierTest extends TestCase {
public function testPrepareSuccess(): void {
$fileName = 'Gre\'thor.odp';
$displayName = 'Huraga';
- $message = '@Huraga mentioned you in a comment on "Gre\'thor.odp"';
- /** @var Node|MockObject $node */
+ /** @var Node&MockObject $node */
$node = $this->createMock(Node::class);
$node
->expects($this->atLeastOnce())
@@ -192,7 +184,6 @@ class NotifierTest extends TestCase {
public function testPrepareSuccessDeletedUser(): void {
$fileName = 'Gre\'thor.odp';
- $message = 'You were mentioned on "Gre\'thor.odp", in a comment by an account that has since been deleted';
/** @var Node|MockObject $node */
$node = $this->createMock(Node::class);