From 90e371195ef399551826ca1a2a319c8d56e41032 Mon Sep 17 00:00:00 2001 From: X! Date: Fri, 31 Dec 2010 21:05:51 +0000 Subject: [PATCH] Only destroy DB if it needs it --- tests/phpunit/MediaWikiTestCase.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) 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__ ); } -- 2.20.1