http://www.mediawiki.org/wiki/Special:Code/MediaWiki/89070

Revision: 89070
Author:   hashar
Date:     2011-05-28 21:19:24 +0000 (Sat, 28 May 2011)
Log Message:
-----------
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: trunk/phase3/tests/phpunit/MediaWikiTestCase.php
===================================================================
--- trunk/phase3/tests/phpunit/MediaWikiTestCase.php    2011-05-28 20:59:55 UTC 
(rev 89069)
+++ trunk/phase3/tests/phpunit/MediaWikiTestCase.php    2011-05-28 21:19:24 UTC 
(rev 89070)
@@ -59,6 +59,9 @@
                        $this->addDBData();
                        
                        parent::run( $result );
+
+                       $this->removeDBData();
+
                } else {
                        parent::run( $result );
                }
@@ -84,6 +87,12 @@
         * implement this method and do so
         */
        function addDBData() {}
+
+       /**
+        * Stub. If a test needs to remove data from the database. Called after
+        * test run.
+        */
+       function removeDBData() {}
        
        private function addCoreDBData() {
 


_______________________________________________
MediaWiki-CVS mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs

Reply via email to