diff options
author | Bartosz Dziewoński <matma.rex@gmail.com> | 2023-01-10 21:33:47 +0100 |
---|---|---|
committer | Bartosz Dziewoński <matma.rex@gmail.com> | 2023-01-10 21:34:00 +0100 |
commit | 84a43f20f0cc2baed218215f9fb33abea040f359 (patch) | |
tree | cd4fb1c5cf316db6cd58fdc7d9b61b4229ad4c87 /tests/phpunit/unit/includes/htmlform/HTMLCheckMatrixTest.php | |
parent | e967eac4927cc844be1972b70bfea6ef440c2a99 (diff) | |
download | mediawikicore-84a43f20f0cc2baed218215f9fb33abea040f359.tar.gz mediawikicore-84a43f20f0cc2baed218215f9fb33abea040f359.zip |
Simplify callback in HTMLForm tests
The anonymous function was equivalent to just specifying 'wfMessage'.
Same as in I355504984d343a2c7c469759f791612c5b6d6556 in Wikibase.
Change-Id: Ib94b7cceabce25ca95374d944255c7197e6a476a
Follows-Up: Ica0740049f0a3e8ec764903c5b71825e4d628a3f
Diffstat (limited to 'tests/phpunit/unit/includes/htmlform/HTMLCheckMatrixTest.php')
-rw-r--r-- | tests/phpunit/unit/includes/htmlform/HTMLCheckMatrixTest.php | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/tests/phpunit/unit/includes/htmlform/HTMLCheckMatrixTest.php b/tests/phpunit/unit/includes/htmlform/HTMLCheckMatrixTest.php index 2aea700abe13..309b955baa68 100644 --- a/tests/phpunit/unit/includes/htmlform/HTMLCheckMatrixTest.php +++ b/tests/phpunit/unit/includes/htmlform/HTMLCheckMatrixTest.php @@ -13,10 +13,7 @@ class HTMLCheckMatrixTest extends MediaWikiUnitTestCase { protected function setUp(): void { parent::setUp(); $htmlForm = $this->createMock( HTMLForm::class ); - $htmlForm->method( 'msg' ) - ->willReturnCallback( static function ( ...$args ) { - return call_user_func_array( 'wfMessage', $args ); - } ); + $htmlForm->method( 'msg' )->willReturnCallback( 'wfMessage' ); $this->defaultOptions['parent'] = $htmlForm; } |