update export-demo.xml to version-0.8.xsd
authorumherirrender <umherirrender_de.wp@web.de>
Sat, 3 Nov 2012 18:37:02 +0000 (19:37 +0100)
committerumherirrender <umherirrender_de.wp@web.de>
Sat, 3 Nov 2012 18:37:02 +0000 (19:37 +0100)
Add a assertion to the validation test to ensure, export-demo.xml is
updated next time, when a new version is created.

Change-Id: I004ca23d848dd6701acb45e9b755397b434370c4

docs/export-demo.xml
tests/phpunit/docs/ExportDemoTest.php

index d198b93..591f675 100644 (file)
@@ -1,4 +1,4 @@
-<mediawiki xmlns="http://www.mediawiki.org/xml/export-0.7/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.mediawiki.org/xml/export-0.7/ http://www.mediawiki.org/xml/export-0.7.xsd" version="0.7" xml:lang="en">
+<mediawiki xmlns="http://www.mediawiki.org/xml/export-0.8/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.mediawiki.org/xml/export-0.8/ http://www.mediawiki.org/xml/export-0.8.xsd" version="0.8" xml:lang="en">
   
   <!-- Optional global configuration info -->
   <siteinfo>
       </contributor>
       <minor />
       <comment>I have just one thing to say!</comment>
-      <sha1>5x0ux8iwjrbmfzgv6pkketxgkcnpr7h</sha1>
       <text xml:space="preserve" bytes="25">A bunch of [[text]] here.</text>
+      <sha1>5x0ux8iwjrbmfzgv6pkketxgkcnpr7h</sha1>
+      <model>wikitext</model>
+      <format>text/x-wiki</format>
     </revision>
     
     <revision>
         <ip>10.0.0.2</ip>
       </contributor>
       <comment>new!</comment>
-      <sha1>etaxt3shcge6igz1biwy3d4um2pnle4</sha1>
       <text xml:space="preserve" bytes="24">An earlier [[revision]].</text>
+      <sha1>etaxt3shcge6igz1biwy3d4um2pnle4</sha1>
+      <model>wikitext</model>
+      <format>text/x-wiki</format>
     </revision>
   </page>
   
       <timestamp>2001-01-15T14:03:00Z</timestamp>
       <contributor><ip>10.0.0.2</ip></contributor>
       <comment>hey</comment>
-      <sha1>ml80vmyjlixdstnywwihx003exfzq9j</sha1>
       <text xml:space="preserve" bytes="47">WHYD YOU LOCK PAGE??!!! i was editing that jerk</text>
+      <sha1>ml80vmyjlixdstnywwihx003exfzq9j</sha1>
+      <model>wikitext</model>
+      <format>text/x-wiki</format>
     </revision>
   </page>
   
       <timestamp>2001-01-15T20:34:12Z</timestamp>
       <contributor><username>Foobar</username><id>42</id></contributor>
       <comment>My awesomeest image!</comment>
-      <sha1>mehom37npwkpzhaiwu3wyr0egalumki</sha1>
       <text xml:space="preserve" bytes="52">This is an awesome little imgae. I lurves it. {{PD}}</text>
+      <sha1>mehom37npwkpzhaiwu3wyr0egalumki</sha1>
+      <model>wikitext</model>
+      <format>text/x-wiki</format>
     </revision>
     <upload>
       <timestamp>2001-01-15T20:34:12Z</timestamp>
index ce65d49..211de26 100644 (file)
@@ -26,6 +26,9 @@ class ExportDemoTest extends DumpTestCase {
                $dom = new DomDocument();
                $dom->load( $fname );
 
+               // Ensure, the demo is for the current version
+               $this->assertEquals( $dom->documentElement->getAttribute( 'version' ), $version, 'export-demo.xml should have the current version' );
+
                try {
                        $this->assertTrue( $dom->schemaValidate( "../../docs/export-" . $version . ".xsd" ),
                                "schemaValidate has found an error" );