/** * @group IL_Init */ public function testDeletion() { // set two things for two modules $set = new ilSetting("test_module"); $set->set("foo", "bar"); $set = new ilSetting("test_module2"); $set->set("foo2", "bar2"); $set = new ilSetting("test_module"); $set->deleteAll(); $value = $set->get("foo", false, true) . "-"; // should be "-" now $set = new ilSetting("test_module2"); $value .= $set->get("foo2"); // should be "-bar2" now $this->assertEquals("-bar2", $value); }
/** * drop database tables and delete ilSetting entrys */ protected function uninstallCustom() { global $ilDB; if ($ilDB->tableExists('rep_robj_xvit_data')) { $ilDB->dropTable('rep_robj_xvit_data'); } if ($ilDB->tableExists('rep_robj_xvit_excl')) { $ilDB->dropTable('rep_robj_xvit_excl'); } if ($ilDB->tableExists('rep_robj_xvit_locked')) { $ilDB->dropTable('rep_robj_xvit_locked'); } if ($ilDB->tableExists('rep_robj_xvit_smap')) { $ilDB->dropTable('rep_robj_xvit_smap'); } if ($ilDB->tableExists('rep_robj_xvit_umap')) { $ilDB->dropTable('rep_robj_xvit_umap'); } $settings = new ilSetting('vitero_config'); $settings->deleteAll(); }