X-Git-Url: https://git.heureux-cyclage.org/?p=lhc%2Fweb%2Fwiklou.git;a=blobdiff_plain;f=tests%2Fphpunit%2Fincludes%2Flogging%2FPageLangLogFormatterTest.php;h=081901567eed00932bf65e03b4697210e440ebbc;hp=226e492b220e08cd48577e22d7a6db3caf2739f6;hb=c368a4313b4183af56b0d566e1f7529ba997a110;hpb=a96465f40ad0aa90ff2fc502660841636799c74d diff --git a/tests/phpunit/includes/logging/PageLangLogFormatterTest.php b/tests/phpunit/includes/logging/PageLangLogFormatterTest.php index 226e492b22..081901567e 100644 --- a/tests/phpunit/includes/logging/PageLangLogFormatterTest.php +++ b/tests/phpunit/includes/logging/PageLangLogFormatterTest.php @@ -1,16 +1,19 @@ setMwGlobals( 'wgHooks', array() ); + $this->setMwGlobals( 'wgHooks', [] ); // Register LogHandler, see $wgPageLanguageUseDB in Setup.php - $this->mergeMwGlobalArrayValue( 'wgLogActionsHandlers', array( + $this->mergeMwGlobalArrayValue( 'wgLogActionsHandlers', [ 'pagelang/pagelang' => 'PageLangLogFormatter', - ) ); + ] ); } /** @@ -19,29 +22,29 @@ class PageLangLogFormatterTest extends LogFormatterTestCase { * Do not change the existing data, just add a new database row */ public static function providePageLangLogDatabaseRows() { - return array( + return [ // Current format - array( - array( + [ + [ 'type' => 'pagelang', 'action' => 'pagelang', 'comment' => 'page lang comment', 'namespace' => NS_MAIN, 'title' => 'Page', - 'params' => array( + 'params' => [ '4::oldlanguage' => 'en', '5::newlanguage' => 'de[def]', - ), - ), - array( - 'text' => 'User changed page language for Page from English (en) to Deutsch (de) [default].', - 'api' => array( + ], + ], + [ + 'text' => 'User changed the language of Page from English (en) to Deutsch (de) [default]', + 'api' => [ 'oldlanguage' => 'en', 'newlanguage' => 'de[def]' - ), - ), - ), - ); + ], + ], + ], + ]; } /**