X-Git-Url: https://git.cyclocoop.org/%28%28?a=blobdiff_plain;f=tests%2Fphpunit%2Fincludes%2FExportTest.php;h=a5d357066b3e9d1ebc7beb080ba234b5af125e27;hb=06ba5ca383e29262cbf248bd42859e09acc6563f;hp=a2bb97a2bc1b10a6fab63e30b0a5d0b00b5e01f6;hpb=2f885ee6b797e5a176ce7b270b674a04b5945b06;p=lhc%2Fweb%2Fwiklou.git diff --git a/tests/phpunit/includes/ExportTest.php b/tests/phpunit/includes/ExportTest.php index a2bb97a2bc..a5d357066b 100644 --- a/tests/phpunit/includes/ExportTest.php +++ b/tests/phpunit/includes/ExportTest.php @@ -30,14 +30,14 @@ class ExportTest extends MediaWikiLangTestCase { $title = Title::newFromText( $pageTitle ); - ob_start(); + $sink = new DumpStringOutput; + $exporter->setOutputSink( $sink ); $exporter->openStream(); $exporter->pageByTitle( $title ); $exporter->closeStream(); - $xmlString = ob_get_clean(); // This throws error if invalid xml output - $xmlObject = simplexml_load_string( $xmlString ); + $xmlObject = simplexml_load_string( $sink ); /** * Check namespaces match xml