2021-01-08 22:19:20 +00:00
|
|
|
<?php
|
|
|
|
|
|
|
|
namespace MediaWiki\Extension\DiscussionTools\Tests;
|
|
|
|
|
|
|
|
use MediaWiki\Extension\DiscussionTools\CommentFormatter;
|
|
|
|
use MediaWiki\Extension\DiscussionTools\CommentParser;
|
2022-01-11 15:50:44 +00:00
|
|
|
use Title;
|
2021-07-29 02:16:15 +00:00
|
|
|
use Wikimedia\Parsoid\DOM\Element;
|
2021-01-08 22:19:20 +00:00
|
|
|
|
|
|
|
class MockCommentFormatter extends CommentFormatter {
|
|
|
|
|
|
|
|
public static $data;
|
|
|
|
|
|
|
|
/**
|
2021-07-29 02:16:15 +00:00
|
|
|
* @param Element $container
|
2022-01-11 15:50:44 +00:00
|
|
|
* @param Title $title
|
2021-01-08 22:19:20 +00:00
|
|
|
* @return CommentParser
|
|
|
|
*/
|
2022-01-11 15:50:44 +00:00
|
|
|
protected static function getParser( Element $container, Title $title ): CommentParser {
|
|
|
|
return TestUtils::createParser( $container, $title, static::$data );
|
2021-01-08 22:19:20 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
}
|