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
* @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();