X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=maintenance%2FpreprocessorFuzzTest.php;h=d5d27ad8ce9605aaaef2f05dc63baf2f736d2c68;hb=8c9de54eef541b4e5997f0d40f1619ae84b0b3a4;hp=d102e08c2d9ecb80c3ff487c901f25137ef1c4f6;hpb=47437e0653542aae57ea456b24486efb48ee8aac;p=lhc%2Fweb%2Fwiklou.git diff --git a/maintenance/preprocessorFuzzTest.php b/maintenance/preprocessorFuzzTest.php index d102e08c2d..d5d27ad8ce 100644 --- a/maintenance/preprocessorFuzzTest.php +++ b/maintenance/preprocessorFuzzTest.php @@ -21,6 +21,8 @@ * @ingroup Maintenance */ +use MediaWiki\MediaWikiServices; + $optionsWithoutArgs = [ 'verbose' ]; require_once __DIR__ . '/commandLine.inc'; @@ -43,7 +45,7 @@ class PPFuzzTester { public $minLength = 0; public $maxLength = 20; public $maxTemplates = 5; - // public $outputTypes = array( 'OT_HTML', 'OT_WIKI', 'OT_PREPROCESS' ); + // public $outputTypes = [ 'OT_HTML', 'OT_WIKI', 'OT_PREPROCESS' ]; public $entryPoints = [ 'testSrvus', 'testPst', 'testPreprocess' ]; public $verbose = false; @@ -123,8 +125,7 @@ class PPFuzzTester { // This resolves a few differences between the old preprocessor and the // XML-based one, which doesn't like illegals and converts line endings. // It's done by the MW UI, so it's a reasonably legitimate thing to do. - global $wgContLang; - $s = $wgContLang->normalize( $s ); + $s = MediaWikiServices::getInstance()->getContentLanguage()->normalize( $s ); return $s; }