2021-01-08 22:19:20 +00:00
|
|
|
<?php
|
|
|
|
|
|
|
|
namespace MediaWiki\Extension\DiscussionTools\Tests;
|
|
|
|
|
|
|
|
use MediaWiki\Extension\DiscussionTools\CommentFormatter;
|
|
|
|
use MediaWiki\Extension\DiscussionTools\CommentParser;
|
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
|
2021-01-08 22:19:20 +00:00
|
|
|
* @return CommentParser
|
|
|
|
*/
|
2021-07-29 02:16:15 +00:00
|
|
|
protected static function getParser( Element $container ): CommentParser {
|
2021-02-02 14:12:51 +00:00
|
|
|
return TestUtils::createParser( $container, static::$data );
|
2021-01-08 22:19:20 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
}
|