}
// Real file but invalid xml file
+ $devhack = false;
+ if (!empty($CFG->xmldbdisablenextprevchecking)) {
+ $CFG->xmldbdisablenextprevchecking = false;
+ $devhack = true;
+ }
try {
ob_start(); // hide debug warning
$dbman->delete_tables_from_xmldb_file($CFG->libdir . '/ddl/simpletest/fixtures/invalid.xml');
ob_end_clean();
$this->assertTrue($e instanceof moodle_exception);
}
+ if ($devhack) {
+ $CFG->xmldbdisablenextprevchecking = true;
+ }
// Check that the table has not been deleted from DB
$this->assertTrue($dbman->table_exists('test_table1'));
}
// Real but invalid xml file
+ $devhack = false;
+ if (!empty($CFG->xmldbdisablenextprevchecking)) {
+ $CFG->xmldbdisablenextprevchecking = false;
+ $devhack = true;
+ }
try {
ob_start(); // hide debug warning
$dbman->install_from_xmldb_file($CFG->libdir.'/ddl/simpletest/fixtures/invalid.xml');
ob_end_clean();
$this->assertTrue($e instanceof moodle_exception);
}
+ if ($devhack) {
+ $CFG->xmldbdisablenextprevchecking = true;
+ }
// Check that the table has not yet been created in DB
$this->assertFalse($dbman->table_exists('test_table1'));