summaryrefslogtreecommitdiff
path: root/modules/taxonomy/taxonomy.test
diff options
context:
space:
mode:
authorwebchick <webchick@24967.no-reply.drupal.org>2012-02-29 00:15:01 -0800
committerwebchick <webchick@24967.no-reply.drupal.org>2012-02-29 00:15:01 -0800
commit15cd0ca6ff82a49e2f7277c6372e8e2dd645b5eb (patch)
tree22509ffc0270902449367a6b3bb1597dfec24485 /modules/taxonomy/taxonomy.test
parent7873fac4267a770e517f5bc3030bf59a3b12ef03 (diff)
downloadbrdo-15cd0ca6ff82a49e2f7277c6372e8e2dd645b5eb.tar.gz
brdo-15cd0ca6ff82a49e2f7277c6372e8e2dd645b5eb.tar.bz2
Issue #814804 by JacobSingh, ksenzee, xjm, draenen, paul.lovvik, David_Rothstein, Gábor Hojtsy, Yorirou: Fixed taxonomy_autocomplete() produces SQL error for nonexistent field.
Diffstat (limited to 'modules/taxonomy/taxonomy.test')
-rw-r--r--modules/taxonomy/taxonomy.test8
1 files changed, 8 insertions, 0 deletions
diff --git a/modules/taxonomy/taxonomy.test b/modules/taxonomy/taxonomy.test
index 70b2e8e12..98f44000e 100644
--- a/modules/taxonomy/taxonomy.test
+++ b/modules/taxonomy/taxonomy.test
@@ -696,6 +696,14 @@ class TaxonomyTermTestCase extends TaxonomyWebTestCase {
$input = substr($term_objects['term3']->name, 0, 3);
$this->drupalGet('taxonomy/autocomplete/taxonomy_' . $this->vocabulary->machine_name . '/' . $input);
$this->assertRaw('{"' . $term_objects['term3']->name . '":"' . $term_objects['term3']->name . '"}', t('Autocomplete returns term %term_name after typing the first 3 letters.', array('%term_name' => $term_objects['term3']->name)));
+
+ // Test taxonomy autocomplete with a nonexistent field.
+ $field_name = $this->randomName();
+ $tag = $this->randomName();
+ $message = t("Taxonomy field @field_name not found.", array('@field_name' => $field_name));
+ $this->assertFalse(field_info_field($field_name), t('Field %field_name does not exist.', array('%field_name' => $field_name)));
+ $this->drupalGet('taxonomy/autocomplete/' . $field_name . '/' . $tag);
+ $this->assertRaw($message, t('Autocomplete returns correct error message when the taxonomy field does not exist.'));
}
/**