Only destroy DB if it needs it
authorX! <soxred93@users.mediawiki.org>
Fri, 31 Dec 2010 21:05:51 +0000 (21:05 +0000)
committerX! <soxred93@users.mediawiki.org>
Fri, 31 Dec 2010 21:05:51 +0000 (21:05 +0000)
tests/phpunit/MediaWikiTestCase.php

index 3ad8edc..cc849d9 100644 (file)
@@ -49,7 +49,9 @@ abstract class MediaWikiTestCase extends PHPUnit_Framework_TestCase {
        }
        
        function __destruct() {
-               $this->destroyDB();
+               if( $this->needsDB() ) {
+                       $this->destroyDB();
+               }
        }
        
        function needsDB() {
@@ -121,7 +123,7 @@ abstract class MediaWikiTestCase extends PHPUnit_Framework_TestCase {
                        //return;
                        //Temporary tables seem to be broken ATM, delete anyway
                }
-
+               
                if( $this->db->getType() == 'oracle' ) {
                        $tables = $this->db->listTables( 'ut_', __METHOD__ );
                }