/** * @expectedException \UnexpectedValueException */ public function testSaveIncomplete() { $manager = $this->getManager(); $comment = new \OC\Comments\Comment(); $comment->setMessage('from no one to nothing'); $manager->save($comment); }
/** * @expectedException \OCP\Comments\MessageTooLongException */ public function testSetUberlongMessage() { $comment = new \OC\Comments\Comment(); $msg = str_pad('', IComment::MAX_MESSAGE_LENGTH + 1, 'x'); $comment->setMessage($msg); }