mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/AbuseFilter.git
synced 2024-11-27 15:30:42 +00:00
Merge "Fix wrong getMockMessage() calls in tests"
This commit is contained in:
commit
bce13e31a7
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue