From: skodak Date: Sat, 10 Jan 2009 13:54:11 +0000 (+0000) Subject: MDL-16483 - partial unbreaking of eventlsib test X-Git-Url: http://git.mjollnir.org/gw?a=commitdiff_plain;h=760ab567d0769762363ec6bcf20ebf82bb435ffa;p=moodle.git MDL-16483 - partial unbreaking of eventlsib test --- diff --git a/lib/simpletest/testeventslib.php b/lib/simpletest/testeventslib.php index 5b74a3c4d2..3bcc36d9a1 100755 --- a/lib/simpletest/testeventslib.php +++ b/lib/simpletest/testeventslib.php @@ -74,8 +74,7 @@ class sample_handler_class { } } -class eventslib_test extends FakeDBUnitTestCase { - private $realdb; +class eventslib_test extends UnitTestCase { /** * Create temporary entries in the database for these tests. * These tests have to work no matter the data currently in the database @@ -84,14 +83,6 @@ class eventslib_test extends FakeDBUnitTestCase { */ function setUp() { // Set global category settings to -1 (not force) - global $CFG, $DB; - - if (is_null($DB)) { - $this->realdb = $DB; - $DB = moodle_database::get_driver_instance($CFG->dbtype, $CFG->dblibrary); - $DB->connect($CFG->dbhost, $CFG->dbuser, $CFG->dbpass, $CFG->dbname, $CFG->prefix); - } - events_uninstall('unittest'); sample_function_handler('reset'); sample_handler_class::static_method('reset');