SECURITY: blacklist CSS var()
[lhc/web/wiklou.git] / tests / phpunit / includes / CommentStoreCommentTest.php
1 <?php
2
3 use PHPUnit\Framework\TestCase;
4
5 /**
6 * @covers CommentStoreComment
7 *
8 * @license GPL-2.0-or-later
9 */
10 class CommentStoreCommentTest extends TestCase {
11
12 public function testConstructorWithMessage() {
13 $message = new Message( 'test' );
14 $comment = new CommentStoreComment( null, 'test', $message );
15
16 $this->assertSame( $message, $comment->message );
17 }
18
19 public function testConstructorWithoutMessage() {
20 $text = '{{template|param}}';
21 $comment = new CommentStoreComment( null, $text );
22
23 $this->assertSame( $text, $comment->message->text() );
24 }
25
26 }