diff options
author | Côme Chilliet <come.chilliet@nextcloud.com> | 2022-12-19 09:57:32 +0100 |
---|---|---|
committer | Côme Chilliet <come.chilliet@nextcloud.com> | 2022-12-19 09:57:32 +0100 |
commit | e553cd1bb9cec6bf6200298bcca6637e81163953 (patch) | |
tree | 5ae86e99c2457f6e06ef900963d3a48af2b18795 /apps/comments/tests/Unit/Notification | |
parent | f676076482433da01ce7d60ea68f04fa84a33f86 (diff) | |
download | nextcloud-server-e553cd1bb9cec6bf6200298bcca6637e81163953.tar.gz nextcloud-server-e553cd1bb9cec6bf6200298bcca6637e81163953.zip |
Fix comments and dav tests with Notifications and Activity changes
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
Diffstat (limited to 'apps/comments/tests/Unit/Notification')
-rw-r--r-- | apps/comments/tests/Unit/Notification/NotifierTest.php | 26 |
1 files changed, 8 insertions, 18 deletions
diff --git a/apps/comments/tests/Unit/Notification/NotifierTest.php b/apps/comments/tests/Unit/Notification/NotifierTest.php index ecd22ffd9e3..9281bb99fe8 100644 --- a/apps/comments/tests/Unit/Notification/NotifierTest.php +++ b/apps/comments/tests/Unit/Notification/NotifierTest.php @@ -35,7 +35,6 @@ use OCP\Files\IRootFolder; use OCP\Files\Node; use OCP\IL10N; use OCP\IURLGenerator; -use OCP\IUser; use OCP\IUserManager; use OCP\L10N\IFactory; use OCP\Notification\INotification; @@ -43,7 +42,6 @@ use PHPUnit\Framework\MockObject\MockObject; use Test\TestCase; class NotifierTest extends TestCase { - /** @var Notifier */ protected $notifier; /** @var IFactory|MockObject */ @@ -135,10 +133,8 @@ class NotifierTest extends TestCase { ->method('getSubjectParameters') ->willReturn(['files', '678']); $this->notification - ->expects($this->once()) - ->method('setParsedSubject') - ->with($message) - ->willReturnSelf(); + ->expects($this->never()) + ->method('setParsedSubject'); $this->notification ->expects($this->once()) ->method('setRichSubject') @@ -150,10 +146,8 @@ class NotifierTest extends TestCase { ->with('Hi {mention-user1}!', ['mention-user1' => ['type' => 'user', 'id' => 'you', 'name' => 'Your name']]) ->willReturnSelf(); $this->notification - ->expects($this->once()) - ->method('setParsedMessage') - ->with('Hi @Your name!') - ->willReturnSelf(); + ->expects($this->never()) + ->method('setParsedMessage'); $this->notification ->expects($this->once()) ->method('setIcon') @@ -256,10 +250,8 @@ class NotifierTest extends TestCase { ->method('getSubjectParameters') ->willReturn(['files', '678']); $this->notification - ->expects($this->once()) - ->method('setParsedSubject') - ->with($message) - ->willReturnSelf(); + ->expects($this->never()) + ->method('setParsedSubject'); $this->notification ->expects($this->once()) ->method('setRichSubject') @@ -271,10 +263,8 @@ class NotifierTest extends TestCase { ->with('Hi {mention-user1}!', ['mention-user1' => ['type' => 'user', 'id' => 'you', 'name' => 'Your name']]) ->willReturnSelf(); $this->notification - ->expects($this->once()) - ->method('setParsedMessage') - ->with('Hi @Your name!') - ->willReturnSelf(); + ->expects($this->never()) + ->method('setParsedMessage'); $this->notification ->expects($this->once()) ->method('setIcon') |