3 * Test for the demo xml
7 class ExportDemoTest
extends DumpTestCase
{
12 function testExportDemo() {
13 $this->validateXmlFileAgainstXsd( "../../docs/export-demo.xml" );
17 * Validates a xml file against the xsd.
19 * The validation is slow, because php has to read the xsd on each call.
21 * @param $fname string: name of file to validate
23 protected function validateXmlFileAgainstXsd( $fname ) {
24 $version = WikiExporter
::schemaVersion();
26 $dom = new DomDocument();
30 $this->assertTrue( $dom->schemaValidate( "../../docs/export-" . $version . ".xsd" ),
31 "schemaValidate has found an error" );
32 } catch( Exception
$e ) {
33 $this->fail( "xml not valid against xsd: " . $e->getMessage() );