merged master
[lhc/web/wiklou.git] / tests / phpunit / maintenance / DumpTestCase.php
index 89ae688..d547c94 100644 (file)
@@ -295,16 +295,20 @@ abstract class DumpTestCase extends MediaWikiLangTestCase {
         * @param $text_sha1 string: the base36 SHA-1 of the revision's text
         * @param $text string|false: (optional) The revision's string, or false to check for a
         *            revision stub
-        * @param $model int: the expected content model id (default: CONTENT_MODEL_WIKITEXT)
-        * @param $format int: the expected format model id (default: CONTENT_FORMAT_WIKITEXT)
+        * @param $model String: the expected content model id (default: CONTENT_MODEL_WIKITEXT)
+        * @param $format String: the expected format model id (default: CONTENT_FORMAT_WIKITEXT)
+        * @param $parentid int|false: (optional) id of the parent revision
         */
-       protected function assertRevision( $id, $summary, $text_id, $text_bytes, $text_sha1, $text = false,
-                                                                               $model = CONTENT_MODEL_WIKITEXT, $format = CONTENT_FORMAT_WIKITEXT ) {
+       protected function assertRevision( $id, $summary, $text_id, $text_bytes, $text_sha1, $text = false, $parentid = false,
+                                               $model = CONTENT_MODEL_WIKITEXT, $format = CONTENT_FORMAT_WIKITEXT ) {
 
                $this->assertNodeStart( "revision" );
                $this->skipWhitespace();
 
                $this->assertTextNode( "id", $id );
+               if ( $parentid !== false ) {
+                       $this->assertTextNode( "parentid", $parentid );
+               }
                $this->assertTextNode( "timestamp", false );
 
                $this->assertNodeStart( "contributor" );
@@ -368,4 +372,4 @@ abstract class DumpTestCase extends MediaWikiLangTestCase {
                        $this->skipWhitespace();
                }
        }
-}
\ No newline at end of file
+}