aboutsummaryrefslogtreecommitdiffstats
path: root/tests/lib/Notification/NotificationTest.php
diff options
context:
space:
mode:
Diffstat (limited to 'tests/lib/Notification/NotificationTest.php')
-rw-r--r--tests/lib/Notification/NotificationTest.php15
1 files changed, 9 insertions, 6 deletions
diff --git a/tests/lib/Notification/NotificationTest.php b/tests/lib/Notification/NotificationTest.php
index 48a78bd0fe7..957d74233be 100644
--- a/tests/lib/Notification/NotificationTest.php
+++ b/tests/lib/Notification/NotificationTest.php
@@ -12,19 +12,22 @@ namespace Test\Notification;
use OC\Notification\Notification;
use OCP\Notification\IAction;
use OCP\Notification\INotification;
+use OCP\RichObjectStrings\IRichTextFormatter;
use OCP\RichObjectStrings\IValidator;
+use PHPUnit\Framework\MockObject\MockObject;
use Test\TestCase;
class NotificationTest extends TestCase {
/** @var INotification */
protected $notification;
- /** @var IValidator|\PHPUnit\Framework\MockObject\MockObject */
- protected $validator;
+ protected IValidator&MockObject $validator;
+ protected IRichTextFormatter&MockObject $richTextFormatter;
protected function setUp(): void {
parent::setUp();
$this->validator = $this->createMock(IValidator::class);
- $this->notification = new Notification($this->validator);
+ $this->richTextFormatter = $this->createMock(IRichTextFormatter::class);
+ $this->notification = new Notification($this->validator, $this->richTextFormatter);
}
protected function dataValidString($maxLength) {
@@ -529,7 +532,7 @@ class NotificationTest extends TestCase {
'getSubject',
'getParsedSubject',
])
- ->setConstructorArgs([$this->validator])
+ ->setConstructorArgs([$this->validator, $this->richTextFormatter])
->getMock();
$notification->expects($this->once())
@@ -562,7 +565,7 @@ class NotificationTest extends TestCase {
'getParsedSubject',
'getSubject',
])
- ->setConstructorArgs([$this->validator])
+ ->setConstructorArgs([$this->validator, $this->richTextFormatter])
->getMock();
$notification->expects($this->once())
@@ -611,7 +614,7 @@ class NotificationTest extends TestCase {
'getObjectType',
'getObjectId',
])
- ->setConstructorArgs([$this->validator])
+ ->setConstructorArgs([$this->validator, $this->richTextFormatter])
->getMock();
$notification->expects($this->any())