Merge "build: Update grunt-karma from 2.0.0 to 3.0.0"
[lhc/web/wiklou.git] / maintenance / preprocessorFuzzTest.php
index d102e08..d5d27ad 100644 (file)
@@ -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;
        }