3 use PHPUnit\Framework\TestCase
;
6 * @covers CommentStoreComment
8 * @license GPL-2.0-or-later
10 class CommentStoreCommentTest
extends TestCase
{
12 public function testConstructorWithMessage() {
13 $message = new Message( 'test' );
14 $comment = new CommentStoreComment( null, 'test', $message );
16 $this->assertSame( $message, $comment->message
);
19 public function testConstructorWithoutMessage() {
20 $text = '{{template|param}}';
21 $comment = new CommentStoreComment( null, $text );
23 $this->assertSame( $text, $comment->message
->text() );