ExportDemoTest.php 682 B

1234567891011121314151617181920212223242526272829303132
  1. <?php
  2. /**
  3. * Test making sure the demo export xml is valid.
  4. * This is NOT a unit test
  5. *
  6. * @group Dump
  7. * @group large
  8. */
  9. class ExportDemoTest extends DumpTestCase {
  10. public function testExportDemo() {
  11. $fname = "../../docs/export-demo.xml";
  12. $version = WikiExporter::schemaVersion();
  13. $dom = new DomDocument();
  14. $dom->load( $fname );
  15. // Ensure, the demo is for the current version
  16. $this->assertEquals(
  17. $dom->documentElement->getAttribute( 'version' ),
  18. $version,
  19. 'export-demo.xml should have the current version'
  20. );
  21. $this->assertTrue(
  22. $dom->schemaValidate( "../../docs/export-" . $version . ".xsd" ),
  23. "schemaValidate has found an error"
  24. );
  25. }
  26. }