aboutsummaryrefslogtreecommitdiffstats
path: root/tests/phpunit/unit/includes/htmlform/HTMLCheckMatrixTest.php
diff options
context:
space:
mode:
authorBartosz Dziewoński <matma.rex@gmail.com>2023-01-10 21:33:47 +0100
committerBartosz Dziewoński <matma.rex@gmail.com>2023-01-10 21:34:00 +0100
commit84a43f20f0cc2baed218215f9fb33abea040f359 (patch)
treecd4fb1c5cf316db6cd58fdc7d9b61b4229ad4c87 /tests/phpunit/unit/includes/htmlform/HTMLCheckMatrixTest.php
parente967eac4927cc844be1972b70bfea6ef440c2a99 (diff)
downloadmediawikicore-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.php5
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;
}