Big oops - merged to wrong branch.
[lhc/web/wiklou.git] / tests / phpunit / maintenance / DumpTestCase.php
index f64ad0b..976fd6b 100644 (file)
@@ -3,7 +3,7 @@
 /**
  * Base TestCase for dumps
  */
-abstract class DumpTestCase extends MediaWikiTestCase {
+abstract class DumpTestCase extends MediaWikiLangTestCase {
 
        /**
         * exception to be rethrown once in sound PHPUnit surrounding
@@ -72,7 +72,7 @@ abstract class DumpTestCase extends MediaWikiTestCase {
         *
         * Clears $wgUser, and reports errors from addDBData to PHPUnit
         */
-       protected function setUp() {
+       public function setUp() {
                global $wgUser;
 
                parent::setUp();
@@ -312,13 +312,14 @@ abstract class DumpTestCase extends MediaWikiTestCase {
 
                $this->assertTextNode( "comment", $summary );
 
+               $this->assertTextNode( "sha1", $text_sha1 );
+
                $this->assertNodeStart( "text", false );
                if ( $text_bytes !== false ) {
                        $this->assertEquals( $this->xml->getAttribute( "bytes" ), $text_bytes,
                                "Attribute 'bytes' of revision " . $id );
                }
 
-
                if ( $text === false ) {
                        // Testing for a stub
                        $this->assertEquals( $this->xml->getAttribute( "id" ), $text_id,
@@ -340,8 +341,6 @@ abstract class DumpTestCase extends MediaWikiTestCase {
                        $this->skipWhitespace();
                }
 
-               $this->assertTextNode( "sha1", $text_sha1 );
-
                $this->assertNodeEnd( "revision" );
                $this->skipWhitespace();
        }