| 1 |
<?php |
| 2 |
|
| 3 |
namespace MediaWiki\Tests\Maintenance; |
| 4 |
|
| 5 |
use DOMDocument; |
| 6 |
use WikiExporter; |
| 7 |
|
| 8 |
|
| 9 |
|
| 10 |
|
| 11 |
|
| 12 |
|
| 13 |
|
| 14 |
|
| 15 |
|
| 16 |
class ExportDemoTest extends DumpTestCase { |
| 17 |
|
| 18 |
public function testExportDemo() { |
| 19 |
$fname = __DIR__ . "/../../../docs/export-demo.xml"; |
| 20 |
$version = WikiExporter::schemaVersion(); |
| 21 |
$dom = new DomDocument(); |
| 22 |
$dom->load( $fname ); |
| 23 |
|
| 24 |
|
| 25 |
$this->assertEquals( |
| 26 |
$version, |
| 27 |
$dom->documentElement->getAttribute( 'version' ), |
| 28 |
'export-demo.xml should have the current version' |
| 29 |
); |
| 30 |
|
| 31 |
$this->assertTrue( |
| 32 |
$dom->schemaValidate( __DIR__ . "/../../../docs/export-" . $version . ".xsd" ), |
| 33 |
"schemaValidate has found an error" |
| 34 |
); |
| 35 |
} |
| 36 |
|
| 37 |
} |