summaryrefslogtreecommitdiff
path: root/modules/simpletest
diff options
context:
space:
mode:
Diffstat (limited to 'modules/simpletest')
-rw-r--r--modules/simpletest/tests/upgrade/upgrade.taxonomy.test10
1 files changed, 6 insertions, 4 deletions
diff --git a/modules/simpletest/tests/upgrade/upgrade.taxonomy.test b/modules/simpletest/tests/upgrade/upgrade.taxonomy.test
index e3e3c3d63..72be9ef8a 100644
--- a/modules/simpletest/tests/upgrade/upgrade.taxonomy.test
+++ b/modules/simpletest/tests/upgrade/upgrade.taxonomy.test
@@ -34,8 +34,8 @@ class UpgradePathTaxonomyTestCase extends UpgradePathTestCase {
foreach ($field['settings']['allowed_values'] as $tree) {
// Prefer valid taxonomy term reference fields for a given vocabulary
// when they exist.
- if (empty($instances[$tree['vid']]) || $instances[$tree['vid']] == 'taxonomyextra') {
- $instances[$tree['vid']] = $field['field_name'];
+ if (empty($instances[$tree['vocabulary']]) || $instances[$tree['vocabulary']] == 'taxonomyextra') {
+ $instances[$tree['vocabulary']] = $field['field_name'];
}
}
}
@@ -59,8 +59,10 @@ class UpgradePathTaxonomyTestCase extends UpgradePathTestCase {
// Check that the node type 'page' has been associated to a taxonomy
// reference field for each vocabulary.
- $vocabularies = taxonomy_get_vocabularies();
- $voc_keys = array_keys($vocabularies);
+ $voc_keys = array();
+ foreach (taxonomy_get_vocabularies() as $vocab) {
+ $voc_keys[] = $vocab->machine_name;
+ }
$instances = $this->instanceVocabularies('node', 'page');
$inst_keys = array_keys($instances);
sort($voc_keys);