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=4224443786a3bbc561afaa35ab5c7c3a6624d2b6;hb=c368a4313b4183af56b0d566e1f7529ba997a110;hpb=46287536cfa228ec6b1d301d3e46e864a9683d4a diff --git a/tests/phpunit/includes/logging/PageLangLogFormatterTest.php b/tests/phpunit/includes/logging/PageLangLogFormatterTest.php index 4224443786..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 the language of Page from English (en) to Deutsch (de) [default]', - 'api' => array( + 'api' => [ 'oldlanguage' => 'en', 'newlanguage' => 'de[def]' - ), - ), - ), - ); + ], + ], + ], + ]; } /**