Remove unused test setup from ReferenceListFormatterTest

I think this was just a mistake in I5457304 when this test was
written. There was never an ->exists() call in the code, as far as
I can see.

This is motivated by our ongoing, probably year-long efforts to
clean this codebase up, see T335129.

Change-Id: I72d89213c5cff06d78ac119b3c79827afbd0b4f5
This commit is contained in:
thiemowmde 2024-08-05 16:25:03 +02:00
parent 26d8a80cb5
commit e078155e94

View file

@ -353,11 +353,10 @@ class ReferenceListFormatterTest extends \MediaWikiUnitTestCase {
* @dataProvider provideReferencesFormatEntryAlternateBacklinkLabel
*/
public function testReferencesFormatEntryAlternateBacklinkLabel(
?string $expectedLabel, ?string $labelList, int $offset
?string $expectedLabel, string $labelList, int $offset
) {
$mockMessage = $this->createMock( Message::class );
$mockMessage->method( 'exists' )->willReturn( (bool)$labelList );
$mockMessage->method( 'plain' )->willReturn( $labelList ?? '<missing-junk>' );
$mockMessage = $this->createNoOpMock( Message::class, [ 'plain' ] );
$mockMessage->method( 'plain' )->willReturn( $labelList );
$mockMessageLocalizer = $this->createMock( ReferenceMessageLocalizer::class );
$mockMessageLocalizer->method( 'msg' )