mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/DiscussionTools
synced 2024-11-27 09:43:30 +00:00
eef833a112
Changes to the use statements done automatically via script Change-Id: Ife9826099657bcaeca1beec94863a1600fdf55f8
29 lines
723 B
PHP
29 lines
723 B
PHP
<?php
|
|
|
|
namespace MediaWiki\Extension\DiscussionTools\Tests;
|
|
|
|
use MediaWiki\Extension\DiscussionTools\CommentFormatter;
|
|
use MediaWiki\Extension\DiscussionTools\CommentParser;
|
|
use MediaWiki\Language\Language;
|
|
use MediaWiki\User\UserIdentity;
|
|
use MediaWiki\Utils\MWTimestamp;
|
|
|
|
class MockCommentFormatter extends CommentFormatter {
|
|
|
|
public static CommentParser $parser;
|
|
|
|
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();
|
|
}
|
|
}
|