aboutsummaryrefslogtreecommitdiffstats
path: root/tests/lib/Notification/ManagerTest.php
diff options
context:
space:
mode:
Diffstat (limited to 'tests/lib/Notification/ManagerTest.php')
-rw-r--r--tests/lib/Notification/ManagerTest.php20
1 files changed, 17 insertions, 3 deletions
diff --git a/tests/lib/Notification/ManagerTest.php b/tests/lib/Notification/ManagerTest.php
index 47740ed18b5..2a85316d7c4 100644
--- a/tests/lib/Notification/ManagerTest.php
+++ b/tests/lib/Notification/ManagerTest.php
@@ -18,6 +18,7 @@ use OCP\ICacheFactory;
use OCP\IUserManager;
use OCP\Notification\IManager;
use OCP\Notification\INotification;
+use OCP\RichObjectStrings\IRichTextFormatter;
use OCP\RichObjectStrings\IValidator;
use OCP\Support\Subscription\IRegistry;
use PHPUnit\Framework\MockObject\MockObject;
@@ -28,8 +29,8 @@ class ManagerTest extends TestCase {
/** @var IManager */
protected $manager;
- /** @var IValidator|MockObject */
- protected $validator;
+ protected IValidator&MockObject $validator;
+ protected IRichTextFormatter&MockObject $richTextFormatter;
/** @var IUserManager|MockObject */
protected $userManager;
/** @var ICacheFactory|MockObject */
@@ -49,6 +50,7 @@ class ManagerTest extends TestCase {
parent::setUp();
$this->validator = $this->createMock(IValidator::class);
+ $this->richTextFormatter = $this->createMock(IRichTextFormatter::class);
$this->userManager = $this->createMock(IUserManager::class);
$this->cache = $this->createMock(ICache::class);
$this->subscriptionRegistry = $this->createMock(IRegistry::class);
@@ -64,7 +66,15 @@ class ManagerTest extends TestCase {
$this->coordinator->method('getRegistrationContext')
->willReturn($this->registrationContext);
- $this->manager = new Manager($this->validator, $this->userManager, $this->cacheFactory, $this->subscriptionRegistry, $this->logger, $this->coordinator);
+ $this->manager = new Manager(
+ $this->validator,
+ $this->userManager,
+ $this->cacheFactory,
+ $this->subscriptionRegistry,
+ $this->logger,
+ $this->coordinator,
+ $this->richTextFormatter,
+ );
}
public function testRegisterApp(): void {
@@ -141,6 +151,7 @@ class ManagerTest extends TestCase {
$this->subscriptionRegistry,
$this->logger,
$this->coordinator,
+ $this->richTextFormatter,
])
->setMethods(['getApps'])
->getMock();
@@ -172,6 +183,7 @@ class ManagerTest extends TestCase {
$this->subscriptionRegistry,
$this->logger,
$this->coordinator,
+ $this->richTextFormatter,
])
->setMethods(['getApps'])
->getMock();
@@ -196,6 +208,7 @@ class ManagerTest extends TestCase {
$this->subscriptionRegistry,
$this->logger,
$this->coordinator,
+ $this->richTextFormatter,
])
->setMethods(['getApps'])
->getMock();
@@ -221,6 +234,7 @@ class ManagerTest extends TestCase {
$this->subscriptionRegistry,
$this->logger,
$this->coordinator,
+ $this->richTextFormatter,
])
->setMethods(['getApps'])
->getMock();