summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/lib/comments/comment.php10
1 files changed, 10 insertions, 0 deletions
diff --git a/tests/lib/comments/comment.php b/tests/lib/comments/comment.php
index e6f9c941c96..9b3f2ab166e 100644
--- a/tests/lib/comments/comment.php
+++ b/tests/lib/comments/comment.php
@@ -2,6 +2,7 @@
namespace Test\Comments;
+use OCP\Comments\IComment;
use Test\TestCase;
class Test_Comments_Comment extends TestCase
@@ -107,6 +108,15 @@ class Test_Comments_Comment extends TestCase
$comment->$setter($type, $id);
}
+ /**
+ * @expectedException \OCP\Comments\MessageTooLongException
+ */
+ public function testSetUberlongMessage() {
+ $comment = new \OC\Comments\Comment();
+ $msg = str_pad('', IComment::MAX_MESSAGE_LENGTH + 1, 'x');
+ $comment->setMessage($msg);
+ }
+
}