r89070 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r89069‎ | r89070 | r89071 >
Date:21:19, 28 May 2011
Author:hashar
Status:ok
Tags:
Comment:
Allow test to remove data from the database

This new removeDBData() is run after the tests result. It is similar
to the addDBData() method.
Modified paths:
  • /trunk/phase3/tests/phpunit/MediaWikiTestCase.php (modified) (history)

Diff [purge]

Index: trunk/phase3/tests/phpunit/MediaWikiTestCase.php
@@ -59,6 +59,9 @@
6060 $this->addDBData();
6161
6262 parent::run( $result );
 63+
 64+ $this->removeDBData();
 65+
6366 } else {
6467 parent::run( $result );
6568 }
@@ -84,6 +87,12 @@
8588 * implement this method and do so
8689 */
8790 function addDBData() {}
 91+
 92+ /**
 93+ * Stub. If a test needs to remove data from the database. Called after
 94+ * test run.
 95+ */
 96+ function removeDBData() {}
8897
8998 private function addCoreDBData() {
9099

Follow-up revisions

RevisionCommit summaryAuthorDate
r89071ApiBlockTest now remove block it creates...hashar21:22, 28 May 2011

Status & tagging log