21 import(
'lib.pkp.tests.plugins.PluginTestCase');
22 import(
'lib.pkp.classes.plugins.MetadataPlugin');
29 $affectedTables = parent::getAffectedTables();
32 array(
'controlled_vocabs',
'controlled_vocab_entries',
'controlled_vocab_entry_settings')
45 $controlledVocabFile =
'plugins/metadata/'.$pluginDir.
'/schema/'.METADATA_PLUGIN_VOCAB_DATAFILE;
46 $this->
validateXmlConfig(array(
'./'.$controlledVocabFile,
'./lib/pkp/'.$controlledVocabFile));
50 foreach($controlledVocabs as $controlledVocabSymbolic) {
51 $controlledVocab = $controlledVocabDao->getBySymbolic($controlledVocabSymbolic, 0, 0);
52 if ($controlledVocab) $controlledVocabDao->deleteObject($controlledVocab);
57 unset($plugins[
'metadata'][$pluginName]);
62 foreach($controlledVocabs as $controlledVocab) {
63 self::assertInstanceOf(
'ControlledVocab', $controlledVocabDao->getBySymbolic($controlledVocab, 0, 0));