mediawiki-extensions-Discus.../tests/phpunit/MockCommentFormatter.php
Umherirrender eef833a112 Use namespaced classes
Changes to the use statements done automatically via script

Change-Id: Ife9826099657bcaeca1beec94863a1600fdf55f8
2024-10-19 23:39:18 +02:00

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();
}
}