summaryrefslogtreecommitdiff
path: root/modules/taxonomy/taxonomy.test
diff options
context:
space:
mode:
authorAngie Byron <webchick@24967.no-reply.drupal.org>2010-09-28 03:30:37 +0000
committerAngie Byron <webchick@24967.no-reply.drupal.org>2010-09-28 03:30:37 +0000
commit0c49d5794534fe9fd609c6884bdde8849edcb0eb (patch)
tree029343c988a2dd983e96ece91b2d6adb2e126509 /modules/taxonomy/taxonomy.test
parent782eb4c79c883466ad3414fa981e286b782afe6c (diff)
downloadbrdo-0c49d5794534fe9fd609c6884bdde8849edcb0eb.tar.gz
brdo-0c49d5794534fe9fd609c6884bdde8849edcb0eb.tar.bz2
#358437 follow-up by David_Rothstein, sun, chx: Disallow invalid text format IDs; force 0 and non-existant formats to NULL.
Diffstat (limited to 'modules/taxonomy/taxonomy.test')
-rw-r--r--modules/taxonomy/taxonomy.test2
1 files changed, 2 insertions, 0 deletions
diff --git a/modules/taxonomy/taxonomy.test b/modules/taxonomy/taxonomy.test
index b71cc62c5..9edc6c70f 100644
--- a/modules/taxonomy/taxonomy.test
+++ b/modules/taxonomy/taxonomy.test
@@ -34,6 +34,8 @@ class TaxonomyWebTestCase extends DrupalWebTestCase {
$term = new stdClass();
$term->name = $this->randomName();
$term->description = $this->randomName();
+ // Use the first available text format.
+ $term->format = db_query_range('SELECT format FROM {filter_format}', 0, 1)->fetchField();
$term->vid = $vocabulary->vid;
taxonomy_term_save($term);
return $term;