From: skodak Date: Sat, 10 Jan 2009 13:37:16 +0000 (+0000) Subject: MDL-16483 - stopped using MoodleUnitTestCase in tests where $DB not needed X-Git-Url: http://git.mjollnir.org/gw?a=commitdiff_plain;h=9870944feb3db298d3758e68a327a7ddd61e939e;p=moodle.git MDL-16483 - stopped using MoodleUnitTestCase in tests where $DB not needed --- diff --git a/course/simpletest/testcourselib.php b/course/simpletest/testcourselib.php index 0aa916688a..f72e5bf28c 100755 --- a/course/simpletest/testcourselib.php +++ b/course/simpletest/testcourselib.php @@ -36,15 +36,14 @@ if (!defined('MOODLE_INTERNAL')) { } require_once($CFG->dirroot . '/course/lib.php'); -global $DB; -Mock::generate(get_class($DB), 'mockDB'); -class courselib_test extends MoodleUnitTestCase { +class courselib_test extends UnitTestCase { var $realDB; function setUp() { global $DB; - $this->realDB = clone($DB); + Mock::generate(get_class($DB), 'mockDB'); + $this->realDB = $DB; $DB = new mockDB(); }