mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/DiscussionTools
synced 2024-12-14 01:10:57 +00:00
64bcb583e9
Done automatically via script Change to extension.json done manually Change-Id: Ied7bbddd357290ac6be6bf480be0ee9116e77365
32 lines
740 B
PHP
32 lines
740 B
PHP
<?php
|
|
|
|
namespace MediaWiki\Extension\DiscussionTools\Tests;
|
|
|
|
use Language;
|
|
use MediaWiki\Extension\DiscussionTools\CommentFormatter;
|
|
use MediaWiki\Extension\DiscussionTools\CommentParser;
|
|
use MediaWiki\User\UserIdentity;
|
|
use MediaWiki\Utils\MWTimestamp;
|
|
|
|
class MockCommentFormatter extends CommentFormatter {
|
|
|
|
public static CommentParser $parser;
|
|
|
|
/**
|
|
* @return CommentParser
|
|
*/
|
|
protected static function getParser(): CommentParser {
|
|
return static::$parser;
|
|
}
|
|
|
|
/**
|
|
* @inheritDoc
|
|
*/
|
|
public static function getSignatureRelativeTime(
|
|
MWTimestamp $timestamp, Language $lang, UserIdentity $user
|
|
): string {
|
|
// Relative times can't be used in tests, so just return a plain timestamp
|
|
return $timestamp->getTimestamp();
|
|
}
|
|
}
|