mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/Cite
synced 2024-11-27 16:30:12 +00:00
Merge "Make use of createNoOpMock in ReferenceListFormatterTest"
This commit is contained in:
commit
72056c5fd0
|
@ -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 ) );
|
||||
|
|
Loading…
Reference in a new issue