diff options
author | Thomas Müller <thomas.mueller@tmit.eu> | 2016-02-09 16:35:23 +0100 |
---|---|---|
committer | Thomas Müller <thomas.mueller@tmit.eu> | 2016-02-09 16:35:23 +0100 |
commit | 29820176825c41acef30fa6942922aeb36cfcec3 (patch) | |
tree | 968fb14092999ae38aed3f2eb9af4defcbeba620 /tests | |
parent | d89ddba3a2a1960da35db41ee8912bc5e0f5f23c (diff) | |
parent | bbc86e0756429b4c51e245d6dcf3ad5a5a1785eb (diff) | |
download | nextcloud-server-29820176825c41acef30fa6942922aeb36cfcec3.tar.gz nextcloud-server-29820176825c41acef30fa6942922aeb36cfcec3.zip |
Merge pull request #22228 from owncloud/comments-limit-message
Limit comment message to 1k chars
Diffstat (limited to 'tests')
-rw-r--r-- | tests/lib/comments/comment.php | 10 |
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); + } + } |