Per Nikerabbit, fixes for r89176:
authorAlexandre Emsenhuber <ialex@users.mediawiki.org>
Tue, 14 Jun 2011 15:08:52 +0000 (15:08 +0000)
committerAlexandre Emsenhuber <ialex@users.mediawiki.org>
Tue, 14 Jun 2011 15:08:52 +0000 (15:08 +0000)
* correct variable name in preprocessorFuzzTest.php
* Added type hints in Parser's test methods

includes/parser/Parser.php
maintenance/preprocessorFuzzTest.php

index ff0d936..94a6de5 100644 (file)
@@ -5463,7 +5463,7 @@ class Parser {
         *
         * @return string
         */
-       function testSrvus( $text, $title, ParserOptions $options, $outputType = self::OT_HTML ) {
+       function testSrvus( $text, Title $title, ParserOptions $options, $outputType = self::OT_HTML ) {
                $this->startParse( $title, $options, $outputType, true );
 
                $text = $this->replaceVariables( $text );
@@ -5472,11 +5472,11 @@ class Parser {
                return $text;
        }
 
-       function testPst( $text, $title, $options ) {
+       function testPst( $text, Title $title, ParserOptions $options ) {
                return $this->preSaveTransform( $text, $title, $options->getUser(), $options );
        }
 
-       function testPreprocess( $text, $title, $options ) {
+       function testPreprocess( $text, Title $title, ParserOptions $options ) {
                return $this->testSrvus( $text, $title, $options, self::OT_PREPROCESS );
        }
 
index 4b9d666..55ca8e3 100644 (file)
@@ -227,12 +227,12 @@ class PPFuzzUser extends User {
        }
 
        function getOption( $oname, $defaultOverride = null, $ignoreHidden = false ) {
-               if ( $option === 'fancysig' ) {
+               if ( $oname === 'fancysig' ) {
                        return $this->ppfz_test->fancySig;
-               } elseif ( $option === 'nickname' ) {
+               } elseif ( $oname === 'nickname' ) {
                        return $this->ppfz_test->nickname;
                } else {
-                       return parent::getOption( $option, $defaultOverride, $ignoreHidden );
+                       return parent::getOption( $oname, $defaultOverride, $ignoreHidden );
                }
        }
 }