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:
skodak 2009-01-10 16:06:53 +00:00
parent efd8c7fc6b
commit 84ebf08dcc
5 changed files with 163 additions and 153 deletions

View file

@ -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 {