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