X-Git-Url: http://git.heureux-cyclage.org/?a=blobdiff_plain;f=maintenance%2FpreprocessorFuzzTest.php;h=d5d27ad8ce9605aaaef2f05dc63baf2f736d2c68;hb=9e90793dfa11f32d177858cec5af4c6a01fc390e;hp=d102e08c2d9ecb80c3ff487c901f25137ef1c4f6;hpb=fe79bc528b0e054aa630bd4fcfcdd4a9804892da;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; }