}
}
-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
*/
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');