return array( $revision_id, $text_id );
}
}
- throw new MWException( "Could not determine revision id (" . $status->getXML() . ")" );
+ throw new MWException( "Could not determine revision id (" . $status->getWikiText() . ")" );
}
* @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" );
$this->skipWhitespace();
}
}
-}
\ No newline at end of file
+}