summaryrefslogtreecommitdiffstats
path: root/tests/php
diff options
context:
space:
mode:
authorJoas Schilling <coding@schilljs.com>2022-06-08 10:08:53 +0200
committerJoas Schilling <coding@schilljs.com>2022-06-10 15:51:42 +0200
commit486b89806f4185b01e61009ee486df90cbd5fa22 (patch)
tree5c716b39cb4587d4000aea9adb5f7947c32a02ea /tests/php
parente1f5aa90f7d2faf771a407af42ad985dfa8074bd (diff)
Fix notification handling
Signed-off-by: Joas Schilling <coding@schilljs.com>
Diffstat (limited to 'tests/php')
-rw-r--r--tests/php/Notification/NotifierTest.php17
1 files changed, 6 insertions, 11 deletions
diff --git a/tests/php/Notification/NotifierTest.php b/tests/php/Notification/NotifierTest.php
index 7148f6e6f..2192b3de9 100644
--- a/tests/php/Notification/NotifierTest.php
+++ b/tests/php/Notification/NotifierTest.php
@@ -212,8 +212,7 @@ class NotifierTest extends TestCase {
$n->expects($this->once())
->method('getSubjectParameters')
->willReturn([$uid]);
- $n->expects($this->exactly(2))
- ->method('getObjectType')
+ $n->method('getObjectType')
->willReturn('room');
$n->method('getObjectId')
->willReturn('roomToken');
@@ -329,8 +328,7 @@ class NotifierTest extends TestCase {
$n->expects($this->once())
->method('getSubjectParameters')
->willReturn([$uid]);
- $n->expects($this->exactly(2))
- ->method('getObjectType')
+ $n->method('getObjectType')
->willReturn('room');
$n->method('getObjectId')
->willReturn('roomToken');
@@ -461,8 +459,7 @@ class NotifierTest extends TestCase {
$n->expects($this->once())
->method('getSubjectParameters')
->willReturn([$uid]);
- $n->expects($this->exactly(2))
- ->method('getObjectType')
+ $n->method('getObjectType')
->willReturn('room');
$n->method('getObjectId')
->willReturn('roomToken');
@@ -1022,8 +1019,7 @@ class NotifierTest extends TestCase {
$notification->expects($this->once())
->method('getSubjectParameters')
->willReturn($subjectParameters);
- $notification->expects($this->exactly(2))
- ->method('getObjectType')
+ $notification->method('getObjectType')
->willReturn('chat');
$notification->method('getObjectId')
->willReturn('roomToken');
@@ -1144,11 +1140,10 @@ class NotifierTest extends TestCase {
$n->expects($this->never())
->method('getObjectType');
} elseif ($objectType === null && $app === 'spreed') {
- $n->expects($this->once())
- ->method('getObjectType')
+ $n->method('getObjectType')
->willReturn('');
} else {
- $n->expects($this->exactly(2))
+ $n->expects($this->any())
->method('getObjectType')
->willReturn($objectType);
}