From 6ee7039b29048d14b26eed82cd5626031de73459 Mon Sep 17 00:00:00 2001 From: Platonides Date: Fri, 28 Oct 2011 15:02:10 +0000 Subject: [PATCH] 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 --- tests/phpunit/includes/parser/PreprocessorTest.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/tests/phpunit/includes/parser/PreprocessorTest.php b/tests/phpunit/includes/parser/PreprocessorTest.php index a396480567..e8c0c0ec42 100644 --- a/tests/phpunit/includes/parser/PreprocessorTest.php +++ b/tests/phpunit/includes/parser/PreprocessorTest.php @@ -112,6 +112,10 @@ class PreprocessorTest extends MediaWikiTestCase { * @return string */ function preprocessToXml( $wikiText ) { + if ( method_exists( $this->mPreprocessor, 'preprocessToXml' ) ) { + return $this->normalizeXml( $this->mPreprocessor->preprocessToXml( $wikiText ) ); + } + $dom = $this->mPreprocessor->preprocessToObj( $wikiText ); if ( is_callable( array( $dom, 'saveXML' ) ) ) { return $dom->saveXML(); -- 2.20.1