diff options
Diffstat (limited to 'tests/lib/Comments/CommentTest.php')
-rw-r--r-- | tests/lib/Comments/CommentTest.php | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/tests/lib/Comments/CommentTest.php b/tests/lib/Comments/CommentTest.php index 3cfc897b28e..9e28531a045 100644 --- a/tests/lib/Comments/CommentTest.php +++ b/tests/lib/Comments/CommentTest.php @@ -8,6 +8,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 +64,7 @@ class CommentTest extends TestCase { public function testSetIdIllegalInput(): void { - $this->expectException(\OCP\Comments\IllegalIDChangeException::class); + $this->expectException(IllegalIDChangeException::class); $comment = new Comment(); @@ -81,7 +83,7 @@ class CommentTest extends TestCase { $this->assertSame('', $comment->getId()); } - public function simpleSetterProvider() { + public static function simpleSetterProvider(): array { return [ ['Id', true], ['TopmostParentId', true], @@ -105,7 +107,7 @@ class CommentTest extends TestCase { $comment->$setter($input); } - public function roleSetterProvider() { + public static function roleSetterProvider(): array { return [ ['Actor', true, true], ['Actor', 'users', true], @@ -131,14 +133,14 @@ 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'); $comment->setMessage($msg); } - public function mentionsProvider(): array { + public static function mentionsProvider(): array { return [ [ '@alice @bob look look, a cook!', |