MediaWiki  REL1_20
ExportDemoTest.php
Go to the documentation of this file.
00001 <?php
00007 class ExportDemoTest extends DumpTestCase {
00008 
00012         function testExportDemo() {
00013                 $this->validateXmlFileAgainstXsd( "../../docs/export-demo.xml" );
00014         }
00015 
00023         protected function validateXmlFileAgainstXsd( $fname ) {
00024                 $version = WikiExporter::schemaVersion();
00025 
00026                 $dom = new DomDocument();
00027                 $dom->load( $fname );
00028 
00029                 try {
00030                         $this->assertTrue( $dom->schemaValidate( "../../docs/export-" . $version . ".xsd" ),
00031                                 "schemaValidate has found an error" );
00032                 } catch( Exception $e ) {
00033                         $this->fail( "xml not valid against xsd: " . $e->getMessage() );
00034                 }
00035         }
00036 }