From 3169d49c84388c270f0cc397e0d94611fdb9960e Mon Sep 17 00:00:00 2001 From: tjhunt Date: Wed, 7 Jan 2009 08:59:13 +0000 Subject: [PATCH] unit tests: MDL-17803 test Db instatiate being called from two places, which was overwriting the reference to the real DB. --- lib/simpletestlib.php | 2 -- 1 file changed, 2 deletions(-) diff --git a/lib/simpletestlib.php b/lib/simpletestlib.php index f85f3bf45e..4e09e66eca 100644 --- a/lib/simpletestlib.php +++ b/lib/simpletestlib.php @@ -244,7 +244,6 @@ class MoodleUnitTestCase extends UnitTestCase { */ public function setUp() { parent::setUp(); - UnitTestDB::instantiate(); global $DB; $this->DB =& $DB; ob_start(); @@ -348,7 +347,6 @@ class UnitTestDB { public static function instantiate() { global $CFG, $DB; UnitTestDB::$real_db = clone($DB); - if (empty($CFG->unittestprefix)) { print_error("prefixnotset", 'simpletest'); } -- 2.39.5