Localisation updates from https://translatewiki.net.
[mediawiki.git] / tests / phpunit / docs / ExportDemoTest.php
blobf7ae8451ad127468357789ba8d5ca1cc4f40d338
1 <?php
3 namespace MediaWiki\Tests\Maintenance;
5 use DOMDocument;
6 use WikiExporter;
8 /**
9 * Test making sure the demo export xml is valid.
10 * This is NOT a unit test
12 * @group Dump
13 * @group large
14 * @coversNothing
16 class ExportDemoTest extends DumpTestCase {
18 public function testExportDemo() {
19 $fname = __DIR__ . "/../../../docs/export-demo.xml";
20 $version = WikiExporter::schemaVersion();
21 $dom = new DomDocument();
22 $dom->load( $fname );
24 // Ensure, the demo is for the current version
25 $this->assertEquals(
26 $version,
27 $dom->documentElement->getAttribute( 'version' ),
28 'export-demo.xml should have the current version'
31 $this->assertTrue(
32 $dom->schemaValidate( __DIR__ . "/../../../docs/export-" . $version . ".xsd" ),
33 "schemaValidate has found an error"