Merge "Make use of createNoOpMock in ReferenceListFormatterTest"

This commit is contained in:
jenkins-bot 2024-08-29 10:21:44 +00:00 committed by Gerrit Code Review
commit 72056c5fd0

View file

@ -174,9 +174,9 @@ class ReferenceListFormatterTest extends \MediaWikiUnitTestCase {
public function testCloseIndention( $closingLi, $expectedOutput ) {
/** @var ReferenceListFormatter $formatter */
$formatter = TestingAccessWrapper::newFromObject( new ReferenceListFormatter(
$this->createMock( ErrorReporter::class ),
$this->createMock( AnchorFormatter::class ),
$this->createMock( ReferenceMessageLocalizer::class )
$this->createNoOpMock( ErrorReporter::class ),
$this->createNoOpMock( AnchorFormatter::class ),
$this->createNoOpMock( ReferenceMessageLocalizer::class )
) );
$output = $formatter->closeIndention( $closingLi );
@ -312,8 +312,8 @@ class ReferenceListFormatterTest extends \MediaWikiUnitTestCase {
/** @var ReferenceListFormatter $formatter */
$formatter = TestingAccessWrapper::newFromObject( new ReferenceListFormatter(
$mockErrorReporter,
$this->createMock( AnchorFormatter::class ),
$this->createMock( ReferenceMessageLocalizer::class )
$this->createNoOpMock( AnchorFormatter::class ),
$this->createNoOpMock( ReferenceMessageLocalizer::class )
) );
$parser = $this->createNoOpMock( Parser::class );
@ -367,7 +367,7 @@ class ReferenceListFormatterTest extends \MediaWikiUnitTestCase {
/** @var ReferenceListFormatter $formatter */
$formatter = TestingAccessWrapper::newFromObject( new ReferenceListFormatter(
$errorReporter,
$this->createMock( AnchorFormatter::class ),
$this->createNoOpMock( AnchorFormatter::class ),
$mockMessageLocalizer
) );
@ -397,8 +397,8 @@ class ReferenceListFormatterTest extends \MediaWikiUnitTestCase {
/** @var ReferenceListFormatter $formatter */
$formatter = TestingAccessWrapper::newFromObject( new ReferenceListFormatter(
$this->createMock( ErrorReporter::class ),
$this->createMock( AnchorFormatter::class ),
$this->createNoOpMock( ErrorReporter::class ),
$this->createNoOpMock( AnchorFormatter::class ),
$mockMessageLocalizer
) );
@ -430,8 +430,8 @@ class ReferenceListFormatterTest extends \MediaWikiUnitTestCase {
/** @var ReferenceListFormatter $formatter */
$formatter = TestingAccessWrapper::newFromObject( new ReferenceListFormatter(
$this->createMock( ErrorReporter::class ),
$this->createMock( AnchorFormatter::class ),
$this->createNoOpMock( ErrorReporter::class ),
$this->createNoOpMock( AnchorFormatter::class ),
$mockMessageLocalizer
) );
$this->assertSame( $expected, $formatter->listToText( $list ) );