Browse Source

Fix unit tests

Signed-off-by: Joas Schilling <coding@schilljs.com>
tags/v22.0.0beta1
Joas Schilling 3 years ago
parent
commit
86109f77e0
1 changed files with 3 additions and 3 deletions
  1. 3
    3
      tests/lib/Comments/CommentTest.php

+ 3
- 3
tests/lib/Comments/CommentTest.php View File

$this->assertSame($object['id'], $comment->getObjectId()); $this->assertSame($object['id'], $comment->getObjectId());
} }


public function testSetIdIllegalInput() { public function testSetIdIllegalInput() {
$this->expectException(\OCP\Comments\IllegalIDChangeException::class); $this->expectException(\OCP\Comments\IllegalIDChangeException::class);


$comment->$setter($type, $id); $comment->$setter($type, $id);
} }


public function testSetUberlongMessage() { public function testSetUberlongMessage() {
$this->expectException(\OCP\Comments\MessageTooLongException::class); $this->expectException(\OCP\Comments\MessageTooLongException::class);


' cc @23452-4333-54353-2342 @yolo!' . ' cc @23452-4333-54353-2342 @yolo!' .
' however the most important thing to know is that www.croissant.com/@oil is not valid' . ' however the most important thing to know is that www.croissant.com/@oil is not valid' .
' and won\'t match anything at all', ' and won\'t match anything at all',
['foobar', 'barfoo', 'foo@bar.com', 'bar@foo.org@foobar.io', '23452-4333-54353-2342', 'yolo']
['bar@foo.org@foobar.io', '23452-4333-54353-2342', 'foo@bar.com', 'foobar', 'barfoo', 'yolo']
], ],
[ [
'@@chef is also a valid mention, no matter how strange it looks', ['@chef'] '@@chef is also a valid mention, no matter how strange it looks', ['@chef']

Loading…
Cancel
Save