MDL-16483 $CFG->unittestprefix not required anymore to run unit tests that do not need fake db; it should be saer to let admins modify the prefix in config.php instead of modifying it from php
This commit is contained in:
@@ -596,6 +596,16 @@ class TestSuite {
|
||||
if (is_string($this->_test_cases[$i])) {
|
||||
$class = $this->_test_cases[$i];
|
||||
$test = &new $class();
|
||||
// moodle hack start
|
||||
global $CFG;
|
||||
if (empty($CFG->unittestprefix)) {
|
||||
if ($test instanceof FakeDBUnitTestCase) {
|
||||
// do not execute this test because test tables not present!
|
||||
unset($test);
|
||||
continue;
|
||||
}
|
||||
}
|
||||
// moodle hack end
|
||||
$test->run($reporter);
|
||||
unset($test);
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user