Merge "Fix wrong getMockMessage() calls in tests"

This commit is contained in:
jenkins-bot 2024-04-12 09:32:55 +00:00 committed by Gerrit Code Review
commit bce13e31a7
4 changed files with 4 additions and 4 deletions

View file

@ -20,7 +20,7 @@ class DegroupTest extends MediaWikiIntegrationTestCase {
private function getMsgLocalizer(): MessageLocalizer {
$ml = $this->createMock( MessageLocalizer::class );
$ml->method( 'msg' )->willReturnCallback( function ( $k, $p ) {
$ml->method( 'msg' )->willReturnCallback( function ( $k, ...$p ) {
return $this->getMockMessage( $k, $p );
} );
return $ml;

View file

@ -20,7 +20,7 @@ class BlockAutopromoteTest extends MediaWikiUnitTestCase {
private function getMsgLocalizer(): MessageLocalizer {
$ml = $this->createMock( MessageLocalizer::class );
$ml->method( 'msg' )->willReturnCallback( function ( $k, $p ) {
$ml->method( 'msg' )->willReturnCallback( function ( $k, ...$p ) {
return $this->getMockMessage( $k, $p );
} );
return $ml;

View file

@ -26,7 +26,7 @@ class BlockTest extends MediaWikiUnitTestCase {
private function getMsgLocalizer(): MessageLocalizer {
$ml = $this->createMock( MessageLocalizer::class );
$ml->method( 'msg' )->willReturnCallback( function ( $k, $p ) {
$ml->method( 'msg' )->willReturnCallback( function ( $k, ...$p ) {
return $this->getMockMessage( $k, $p );
} );
return $ml;

View file

@ -29,7 +29,7 @@ class RangeBlockTest extends MediaWikiUnitTestCase {
private function getMsgLocalizer(): MessageLocalizer {
$ml = $this->createMock( MessageLocalizer::class );
$ml->method( 'msg' )->willReturnCallback( function ( $k, $p ) {
$ml->method( 'msg' )->willReturnCallback( function ( $k, ...$p ) {
return $this->getMockMessage( $k, $p );
} );
return $ml;