mediawiki-extensions-Discus.../tests/phpunit/MockCommentFormatter.php
Ed Sanders 34011b7a07 Parser: Pass in title of page being parsed
Will be used to parse selflinks in the future.

Change-Id: I2bc29d1c5c69cb6309f582f162f9af7d96ce8913
2022-01-12 21:17:59 +00:00

24 lines
556 B
PHP

<?php
namespace MediaWiki\Extension\DiscussionTools\Tests;
use MediaWiki\Extension\DiscussionTools\CommentFormatter;
use MediaWiki\Extension\DiscussionTools\CommentParser;
use Title;
use Wikimedia\Parsoid\DOM\Element;
class MockCommentFormatter extends CommentFormatter {
public static $data;
/**
* @param Element $container
* @param Title $title
* @return CommentParser
*/
protected static function getParser( Element $container, Title $title ): CommentParser {
return TestUtils::createParser( $container, $title, static::$data );
}
}