mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/DiscussionTools
synced 2024-11-24 00:13:36 +00:00
Merge "Reduce unused mocks in CommentFormatterTest"
This commit is contained in:
commit
5b415eb241
|
@ -4,7 +4,7 @@ namespace MediaWiki\Extension\DiscussionTools\Tests;
|
|||
|
||||
use FormatJson;
|
||||
use MediaWiki\Cache\GenderCache;
|
||||
use MediaWiki\Config\Config;
|
||||
use MediaWiki\Context\IContextSource;
|
||||
use MediaWiki\MainConfigNames;
|
||||
use MediaWiki\MediaWikiServices;
|
||||
use MediaWiki\Output\OutputPage;
|
||||
|
@ -55,7 +55,7 @@ class CommentFormatterTest extends IntegrationTestCase {
|
|||
string $name, string $titleText, string $dom, string $expected, string $config, string $data,
|
||||
bool $isMobile, bool $useButtons
|
||||
): void {
|
||||
$this->setService( 'GenderCache', $this->createMock( GenderCache::class ) );
|
||||
$this->setService( 'GenderCache', $this->createNoOpMock( GenderCache::class ) );
|
||||
$dom = static::getHtml( $dom );
|
||||
$expectedPath = $expected;
|
||||
$expected = static::getText( $expectedPath );
|
||||
|
@ -77,8 +77,7 @@ class CommentFormatterTest extends IntegrationTestCase {
|
|||
$qqxLang = MediaWikiServices::getInstance()->getLanguageFactory()->getLanguage( 'qqx' );
|
||||
$skin = $this->createMock( Skin::class );
|
||||
$skin->method( 'getSkinName' )->willReturn( 'minerva' );
|
||||
$outputPage = $this->createMock( OutputPage::class );
|
||||
$outputPage->method( 'getConfig' )->willReturn( $this->createMock( Config::class ) );
|
||||
$outputPage = $this->createMock( IContextSource::class );
|
||||
$outputPage->method( 'getTitle' )->willReturn( $title );
|
||||
$outputPage->method( 'getUser' )->willReturn( $user );
|
||||
$outputPage->method( 'getLanguage' )->willReturn( $qqxLang );
|
||||
|
|
Loading…
Reference in a new issue