r101136 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r101135‎ | r101136 | r101137 >
Date:15:02, 28 October 2011
Author:platonides
Status:ok
Tags:
Comment:
Follow-up r99909. If there is a preprocessToXml method, use that.
Some preprocessor could have preprocessToObj as a native type.

PHP Fatal error: Call to a member function __toString() on a non-object in phase3/tests/phpunit/includes/parser/PreprocessorTest.php on line 119
Modified paths:
  • /trunk/phase3/tests/phpunit/includes/parser/PreprocessorTest.php (modified) (history)

Diff [purge]

Index: trunk/phase3/tests/phpunit/includes/parser/PreprocessorTest.php
@@ -112,6 +112,10 @@
113113 * @return string
114114 */
115115 function preprocessToXml( $wikiText ) {
 116+ if ( method_exists( $this->mPreprocessor, 'preprocessToXml' ) ) {
 117+ return $this->normalizeXml( $this->mPreprocessor->preprocessToXml( $wikiText ) );
 118+ }
 119+
116120 $dom = $this->mPreprocessor->preprocessToObj( $wikiText );
117121 if ( is_callable( array( $dom, 'saveXML' ) ) ) {
118122 return $dom->saveXML();

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r99909Followup r80375: let PreprocessorTest work on Preprocessor_Hash etc as well a...brion20:21, 15 October 2011

Status & tagging log