summaryrefslogtreecommitdiff
path: root/modules/simpletest
diff options
context:
space:
mode:
authorAngie Byron <webchick@24967.no-reply.drupal.org>2010-10-01 01:37:13 +0000
committerAngie Byron <webchick@24967.no-reply.drupal.org>2010-10-01 01:37:13 +0000
commit823c0a0a55604429874702d64a85363099224aa1 (patch)
treeb841172c3b29203bf19a039f4493e38084b5a807 /modules/simpletest
parent6d2573e2013655c57ff995e52cd7f267fa4a3a7f (diff)
downloadbrdo-823c0a0a55604429874702d64a85363099224aa1.tar.gz
brdo-823c0a0a55604429874702d64a85363099224aa1.tar.bz2
#881530 by yhahn: Fix exportability of vocabularies by using machine names in taxonomy field's 'allowed values' setting.
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);