MediaWiki  REL1_24
ExportDemoTest.php
Go to the documentation of this file.
00001 <?php
00002 
00010 class ExportDemoTest extends DumpTestCase {
00011 
00012     public function testExportDemo() {
00013         $fname = "../../docs/export-demo.xml";
00014         $version = WikiExporter::schemaVersion();
00015         $dom = new DomDocument();
00016         $dom->load( $fname );
00017 
00018         // Ensure, the demo is for the current version
00019         $this->assertEquals(
00020             $dom->documentElement->getAttribute( 'version' ),
00021             $version,
00022             'export-demo.xml should have the current version'
00023         );
00024 
00025         $this->assertTrue(
00026             $dom->schemaValidate( "../../docs/export-" . $version . ".xsd" ),
00027             "schemaValidate has found an error"
00028         );
00029     }
00030 
00031 }