filebackend: use self:: instead of FileBackend:: for some constant uses
[lhc/web/wiklou.git] / maintenance / preprocessorFuzzTest.php
index 8df01e6..68fb643 100644 (file)
@@ -72,7 +72,7 @@ class PPFuzzTester {
                                $passed = 'passed';
                        } catch ( Exception $e ) {
                                $testReport = self::$currentTest->getReport();
-                               $exceptionReport = $e->getText();
+                               $exceptionReport = $e instanceof MWException ? $e->getText() : (string)$e;
                                $hash = md5( $testReport );
                                file_put_contents( "results/ppft-$hash.in", serialize( self::$currentTest ) );
                                file_put_contents( "results/ppft-$hash.fail",
@@ -195,7 +195,7 @@ class PPFuzzTest {
        }
 
        function execute() {
-               global $wgParser, $wgUser;
+               global $wgUser;
 
                $wgUser = new PPFuzzUser;
                $wgUser->mName = 'Fuzz';
@@ -206,7 +206,7 @@ class PPFuzzTest {
                $options->setTemplateCallback( [ $this, 'templateHook' ] );
                $options->setTimestamp( wfTimestampNow() );
                $this->output = call_user_func(
-                       [ $wgParser, $this->entryPoint ],
+                       [ MediaWikiServices::getInstance()->getParser(), $this->entryPoint ],
                        $this->mainText,
                        $this->title,
                        $options