Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/spreed.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorJoas Schilling <coding@schilljs.com>2021-12-01 16:48:03 +0300
committerJoas Schilling <coding@schilljs.com>2021-12-01 16:57:31 +0300
commitab6dc43ad6a7d49f1d781051eec716e2c2b809ab (patch)
tree1ff3a4df03e8abfae31321c6c31b07e8d14e72eb /tests
parentee57c974772ac48f177e44a3b84c2bc0bdb6ed70 (diff)
Expore message id for desktop client and notifications quick reply
Signed-off-by: Joas Schilling <coding@schilljs.com>
Diffstat (limited to 'tests')
-rw-r--r--tests/php/Notification/NotifierTest.php20
1 files changed, 7 insertions, 13 deletions
diff --git a/tests/php/Notification/NotifierTest.php b/tests/php/Notification/NotifierTest.php
index 042a02472..11f497124 100644
--- a/tests/php/Notification/NotifierTest.php
+++ b/tests/php/Notification/NotifierTest.php
@@ -215,8 +215,7 @@ class NotifierTest extends \Test\TestCase {
$n->expects($this->exactly(2))
->method('getObjectType')
->willReturn('room');
- $n->expects($this->once())
- ->method('getObjectId')
+ $n->method('getObjectId')
->willReturn('roomToken');
$this->notifier->prepare($n, 'de');
@@ -333,8 +332,7 @@ class NotifierTest extends \Test\TestCase {
$n->expects($this->exactly(2))
->method('getObjectType')
->willReturn('room');
- $n->expects($this->once())
- ->method('getObjectId')
+ $n->method('getObjectId')
->willReturn('roomToken');
return $n;
@@ -466,8 +464,7 @@ class NotifierTest extends \Test\TestCase {
$n->expects($this->exactly(2))
->method('getObjectType')
->willReturn('room');
- $n->expects($this->once())
- ->method('getObjectId')
+ $n->method('getObjectId')
->willReturn('roomToken');
$this->notifier->prepare($n, 'de');
@@ -1028,8 +1025,7 @@ class NotifierTest extends \Test\TestCase {
$notification->expects($this->exactly(2))
->method('getObjectType')
->willReturn('chat');
- $notification->expects($this->once())
- ->method('getObjectId')
+ $notification->method('getObjectId')
->willReturn('roomToken');
$notification->expects($this->once())
->method('getMessageParameters')
@@ -1043,7 +1039,7 @@ class NotifierTest extends \Test\TestCase {
['Incorrect app', 'invalid-app', null, null, null, null, null],
'User can not use Talk' => [AlreadyProcessedException::class, 'spreed', true, null, null, null, null],
'Invalid room' => [AlreadyProcessedException::class, 'spreed', false, false, null, null, null, '12345'],
- 'Invalid room' => [AlreadyProcessedException::class, 'spreed', false, false, null, null, null],
+ 'Invalid room without token' => [AlreadyProcessedException::class, 'spreed', false, false, null, null, null],
['Unknown subject', 'spreed', false, true, 'invalid-subject', null, null],
['Unknown object type', 'spreed', false, true, 'invitation', null, 'invalid-object-type'],
'Calling user does not exist anymore' => [AlreadyProcessedException::class, 'spreed', false, true, 'invitation', ['admin'], 'room'],
@@ -1075,16 +1071,14 @@ class NotifierTest extends \Test\TestCase {
$room = $this->createMock(Room::class);
$room->expects($this->never())
->method('getType');
- $n->expects($this->once())
- ->method('getObjectId')
+ $n->method('getObjectId')
->willReturn($token);
$this->manager->expects($this->once())
->method('getRoomByToken')
->with($token)
->willReturn($room);
} elseif ($validRoom === false) {
- $n->expects($this->once())
- ->method('getObjectId')
+ $n->method('getObjectId')
->willReturn($token);
$this->manager->expects($this->once())
->method('getRoomByToken')