diff options
Diffstat (limited to 'tests/lib/Comments/CommentTest.php')
-rw-r--r-- | tests/lib/Comments/CommentTest.php | 17 |
1 files changed, 10 insertions, 7 deletions
diff --git a/tests/lib/Comments/CommentTest.php b/tests/lib/Comments/CommentTest.php index 988ffbe0e0b..ca5d12f932c 100644 --- a/tests/lib/Comments/CommentTest.php +++ b/tests/lib/Comments/CommentTest.php @@ -1,4 +1,5 @@ <?php + /** * SPDX-FileCopyrightText: 2016-2024 Nextcloud GmbH and Nextcloud contributors * SPDX-FileCopyrightText: 2016 ownCloud, Inc. @@ -8,6 +9,8 @@ namespace Test\Comments; use OC\Comments\Comment; use OCP\Comments\IComment; +use OCP\Comments\IllegalIDChangeException; +use OCP\Comments\MessageTooLongException; use Test\TestCase; class CommentTest extends TestCase { @@ -62,7 +65,7 @@ class CommentTest extends TestCase { public function testSetIdIllegalInput(): void { - $this->expectException(\OCP\Comments\IllegalIDChangeException::class); + $this->expectException(IllegalIDChangeException::class); $comment = new Comment(); @@ -131,7 +134,7 @@ class CommentTest extends TestCase { public function testSetUberlongMessage(): void { - $this->expectException(\OCP\Comments\MessageTooLongException::class); + $this->expectException(MessageTooLongException::class); $comment = new Comment(); $msg = str_pad('', IComment::MAX_MESSAGE_LENGTH + 1, 'x'); @@ -158,11 +161,11 @@ class CommentTest extends TestCase { /* author: */ 'alice' ], [ - '@foobar and @barfoo you should know, @foo@bar.com is valid' . - ' and so is @bar@foo.org@foobar.io I hope that clarifies everything.' . - ' cc @23452-4333-54353-2342 @yolo!' . - ' however the most important thing to know is that www.croissant.com/@oil is not valid' . - ' and won\'t match anything at all', + '@foobar and @barfoo you should know, @foo@bar.com is valid' + . ' and so is @bar@foo.org@foobar.io I hope that clarifies everything.' + . ' cc @23452-4333-54353-2342 @yolo!' + . ' however the most important thing to know is that www.croissant.com/@oil is not valid' + . ' and won\'t match anything at all', [ ['type' => 'user', 'id' => 'bar@foo.org@foobar.io'], ['type' => 'user', 'id' => '23452-4333-54353-2342'], |