From: Alexandre Emsenhuber Date: Tue, 14 Jun 2011 15:08:52 +0000 (+0000) Subject: Per Nikerabbit, fixes for r89176: X-Git-Tag: 1.31.0-rc.0~29540 X-Git-Url: http://git.cyclocoop.org/ecrire?a=commitdiff_plain;h=e9763263437d0bc467890422f87442f4af863863;p=lhc%2Fweb%2Fwiklou.git Per Nikerabbit, fixes for r89176: * correct variable name in preprocessorFuzzTest.php * Added type hints in Parser's test methods --- diff --git a/includes/parser/Parser.php b/includes/parser/Parser.php index ff0d9361be..94a6de59fb 100644 --- a/includes/parser/Parser.php +++ b/includes/parser/Parser.php @@ -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 ); } diff --git a/maintenance/preprocessorFuzzTest.php b/maintenance/preprocessorFuzzTest.php index 4b9d666f1c..55ca8e388e 100644 --- a/maintenance/preprocessorFuzzTest.php +++ b/maintenance/preprocessorFuzzTest.php @@ -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 ); } } }