]> git.mjollnir.org Git - moodle.git/commitdiff
MDL-16483 - partial unbreaking of eventlsib test
authorskodak <skodak>
Sat, 10 Jan 2009 13:54:11 +0000 (13:54 +0000)
committerskodak <skodak>
Sat, 10 Jan 2009 13:54:11 +0000 (13:54 +0000)
lib/simpletest/testeventslib.php

index 5b74a3c4d25dd74dced603f6f6a755cc24474165..3bcc36d9a1a046e57bea4ee473a5e5e3d2fd497c 100755 (executable)
@@ -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');