Debian Codegraph @

tests/phpunit/includes/CommentStore/CommentStoreCommentTest.php

raw symbols SCIP
1 <?php
2
3 use MediaWiki\CommentStore\CommentStoreComment;
4 use MediaWiki\Message\Message;
5 use PHPUnit\Framework\TestCase;
6
7 /**
8 * @covers \MediaWiki\CommentStore\CommentStoreComment
9 *
10 * @license GPL-2.0-or-later
11 */
12 class CommentStoreCommentTest extends TestCase {
13
14 public function testConstructorWithMessage() {
15 $message = new Message( 'test' );
16 $comment = new CommentStoreComment( null, 'test', $message );
17
18 $this->assertSame( $message, $comment->message );
19 }
20
21 public function testConstructorWithoutMessage() {
22 $text = '{{template|param}}';
23 $comment = new CommentStoreComment( null, $text );
24
25 $this->assertSame( $text, $comment->message->text() );
26 }
27
28 }