diff options
author | Joas Schilling <coding@schilljs.com> | 2021-10-12 14:05:38 +0200 |
---|---|---|
committer | Joas Schilling <coding@schilljs.com> | 2021-10-12 14:05:38 +0200 |
commit | 3487aeeb1f49b80ed6a9d1441e13c7511e2dc822 (patch) | |
tree | 2679729fc2833bacf00ec73e0222ab33b01c3a5b /tests | |
parent | 6536ff2cecb6f2864b3079a13f559f5164cc60fe (diff) | |
download | nextcloud-server-3487aeeb1f49b80ed6a9d1441e13c7511e2dc822.tar.gz nextcloud-server-3487aeeb1f49b80ed6a9d1441e13c7511e2dc822.zip |
Add integration tests for group
Signed-off-by: Joas Schilling <coding@schilljs.com>
Diffstat (limited to 'tests')
-rw-r--r-- | tests/lib/Comments/CommentTest.php | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/tests/lib/Comments/CommentTest.php b/tests/lib/Comments/CommentTest.php index 7b3254ac141..28e38d7b143 100644 --- a/tests/lib/Comments/CommentTest.php +++ b/tests/lib/Comments/CommentTest.php @@ -160,6 +160,9 @@ class CommentTest extends TestCase { [ 'Also @"guest/0123456789abcdef" are now supported', [], null, ['guest/0123456789abcdef'] ], + [ + 'Also @"group/My Group ID 321" are now supported', [], null, [], ['My Group ID 321'] + ], ]; } @@ -171,7 +174,7 @@ class CommentTest extends TestCase { * @param string|null $author * @param array $expectedGuests */ - public function testMentions(string $message, array $expectedUids, ?string $author = null, array $expectedGuests = []): void { + public function testMentions(string $message, array $expectedUids, ?string $author = null, array $expectedGuests = [], array $expectedGroups = []): void { $comment = new Comment(); $comment->setMessage($message); if (!is_null($author)) { @@ -183,6 +186,8 @@ class CommentTest extends TestCase { $id = array_shift($expectedUids); } elseif ($mention['type'] === 'guest') { $id = array_shift($expectedGuests); + } elseif ($mention['type'] === 'group') { + $id = array_shift($expectedGroups); } else { $this->fail('Unexpected mention type'); continue; |