From 823c0a0a55604429874702d64a85363099224aa1 Mon Sep 17 00:00:00 2001 From: Angie Byron Date: Fri, 1 Oct 2010 01:37:13 +0000 Subject: #881530 by yhahn: Fix exportability of vocabularies by using machine names in taxonomy field's 'allowed values' setting. --- modules/simpletest/tests/upgrade/upgrade.taxonomy.test | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'modules/simpletest') 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); -- cgit v1.2.3