MediaWiki
REL1_30
ExportDemoTest.php
Go to the documentation of this file.
1
<?php
2
10
class
ExportDemoTest
extends
DumpTestCase
{
11
12
public
function
testExportDemo
() {
13
$fname
=
"../../docs/export-demo.xml"
;
14
$version =
WikiExporter::schemaVersion
();
15
$dom =
new
DomDocument();
16
$dom->load(
$fname
);
17
18
// Ensure, the demo is for the current version
19
$this->assertEquals(
20
$dom->documentElement->getAttribute(
'version'
),
21
$version,
22
'export-demo.xml should have the current version'
23
);
24
25
$this->assertTrue(
26
$dom->schemaValidate(
"../../docs/export-"
. $version .
".xsd"
),
27
"schemaValidate has found an error"
28
);
29
}
30
31
}
$fname
if(!defined( 'MEDIAWIKI')) $fname
This file is not a valid entry point, perform no further processing unless MEDIAWIKI is defined.
Definition
Setup.php:36
DumpTestCase
Base TestCase for dumps.
Definition
DumpTestCase.php:6
ExportDemoTest
Test making sure the demo export xml is valid.
Definition
ExportDemoTest.php:10
ExportDemoTest\testExportDemo
testExportDemo()
Definition
ExportDemoTest.php:12
WikiExporter\schemaVersion
static schemaVersion()
Returns the export schema version.
Definition
WikiExporter.php:74
tests
phpunit
docs
ExportDemoTest.php
Generated on Mon Nov 25 2024 15:43:37 for MediaWiki by
1.10.0