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:
authorVitor Mattos <vitor@php.rio>2022-02-11 18:54:15 +0300
committerVitor Mattos <vitor@php.rio>2022-02-11 18:54:15 +0300
commit5a324693aa88a4b43eff383fb9d9229afffa6315 (patch)
tree1e5339d2d5def1589746998c3ca8fd18a188c9a5 /tests
parent1d90b56b298d801b8e6a3762b3364c815885e449 (diff)
Array handling fix
Signed-off-by: Vitor Mattos <vitor@php.rio>
Diffstat (limited to 'tests')
-rw-r--r--tests/php/Chat/NotifierTest.php12
1 files changed, 12 insertions, 0 deletions
diff --git a/tests/php/Chat/NotifierTest.php b/tests/php/Chat/NotifierTest.php
index b2b62551a..f3fc6df01 100644
--- a/tests/php/Chat/NotifierTest.php
+++ b/tests/php/Chat/NotifierTest.php
@@ -164,6 +164,18 @@ class NotifierTest extends TestCase {
$room = $this->getRoom();
$comment = $this->newComment('108', 'users', 'testUser', new \DateTime('@' . 1000000016), $message);
$notifier = $this->getNotifier([]);
+ $alreadyNotifiedUsers = array_map(function ($user): array {
+ return [
+ 'id' => $user,
+ 'type' => Attendee::ACTOR_USERS,
+ ];
+ }, $alreadyNotifiedUsers);
+ $expectedReturn = array_map(function ($user): array {
+ return [
+ 'id' => $user,
+ 'type' => Attendee::ACTOR_USERS,
+ ];
+ }, $expectedReturn);
$actual = $notifier->notifyMentionedUsers($room, $comment, $alreadyNotifiedUsers);
$this->assertEqualsCanonicalizing($expectedReturn, $actual);