diff options
author | Pierre Schmitz <pierre@archlinux.de> | 2013-01-18 16:46:04 +0100 |
---|---|---|
committer | Pierre Schmitz <pierre@archlinux.de> | 2013-01-18 16:46:04 +0100 |
commit | 63601400e476c6cf43d985f3e7b9864681695ed4 (patch) | |
tree | f7846203a952e38aaf66989d0a4702779f549962 /tests/phpunit/docs | |
parent | 8ff01378c9e0207f9169b81966a51def645b6a51 (diff) |
Update to MediaWiki 1.20.2
this update includes:
* adjusted Arch Linux skin
* updated FluxBBAuthPlugin
* patch for https://bugzilla.wikimedia.org/show_bug.cgi?id=44024
Diffstat (limited to 'tests/phpunit/docs')
-rw-r--r-- | tests/phpunit/docs/ExportDemoTest.php | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/tests/phpunit/docs/ExportDemoTest.php b/tests/phpunit/docs/ExportDemoTest.php new file mode 100644 index 00000000..ce65d494 --- /dev/null +++ b/tests/phpunit/docs/ExportDemoTest.php @@ -0,0 +1,36 @@ +<?php +/** + * Test for the demo xml + * + * @group Dump + */ +class ExportDemoTest extends DumpTestCase { + + /** + * @group large + */ + function testExportDemo() { + $this->validateXmlFileAgainstXsd( "../../docs/export-demo.xml" ); + } + + /** + * Validates a xml file against the xsd. + * + * The validation is slow, because php has to read the xsd on each call. + * + * @param $fname string: name of file to validate + */ + protected function validateXmlFileAgainstXsd( $fname ) { + $version = WikiExporter::schemaVersion(); + + $dom = new DomDocument(); + $dom->load( $fname ); + + try { + $this->assertTrue( $dom->schemaValidate( "../../docs/export-" . $version . ".xsd" ), + "schemaValidate has found an error" ); + } catch( Exception $e ) { + $this->fail( "xml not valid against xsd: " . $e->getMessage() ); + } + } +} |