From: X! Date: Fri, 31 Dec 2010 21:05:51 +0000 (+0000) Subject: Only destroy DB if it needs it X-Git-Tag: 1.31.0-rc.0~32947 X-Git-Url: http://git.cyclocoop.org/%24href?a=commitdiff_plain;h=90e371195ef399551826ca1a2a319c8d56e41032;p=lhc%2Fweb%2Fwiklou.git Only destroy DB if it needs it --- diff --git a/tests/phpunit/MediaWikiTestCase.php b/tests/phpunit/MediaWikiTestCase.php index 3ad8edcd1d..cc849d99cb 100644 --- a/tests/phpunit/MediaWikiTestCase.php +++ b/tests/phpunit/MediaWikiTestCase.php @@ -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__ ); }