24 $pageTitle =
'UTPage';
31 $title = Title::newFromText( $pageTitle );
34 $exporter->setOutputSink( $sink );
35 $exporter->openStream();
36 $exporter->pageByTitle( $title );
37 $exporter->closeStream();
39 $oldDisable = libxml_disable_entity_loader(
true );
42 $xmlObject = simplexml_load_string( $sink );
44 libxml_disable_entity_loader( $oldDisable );
49 foreach ( $xmlObject->siteinfo->namespaces->children() as $namespace ) {
51 $xmlNamespaces[] = (
string)$namespace;
53 $xmlNamespaces = str_replace(
' ',
'_', $xmlNamespaces );
56 $actualNamespaces = array_values( $actualNamespaces );
57 $this->assertEquals( $actualNamespaces, $xmlNamespaces );
60 $xmlTitle = (
array)$xmlObject->page->title;
61 $this->assertEquals( $pageTitle, $xmlTitle[0] );
64 $text = (
array)$xmlObject->page->revision->text;
65 $this->assertNotEquals(
'', $text[0] );