diff options
author | Dries Buytaert <dries@buytaert.net> | 2008-12-19 15:34:27 +0000 |
---|---|---|
committer | Dries Buytaert <dries@buytaert.net> | 2008-12-19 15:34:27 +0000 |
commit | da4cd3cc8cb6a644138e72ed56972b4f0f5a0033 (patch) | |
tree | bb6c285ac24cabe34041007c8d7e8f35db80a296 /modules/taxonomy/taxonomy.test | |
parent | ec4eba68d7eb4ee562a343a093253c550b108202 (diff) | |
download | brdo-da4cd3cc8cb6a644138e72ed56972b4f0f5a0033.tar.gz brdo-da4cd3cc8cb6a644138e72ed56972b4f0f5a0033.tar.bz2 |
- Patch #343746 by asimmonds: fixed typo in loading multiple terms at once. Added a test for it too\!
Diffstat (limited to 'modules/taxonomy/taxonomy.test')
-rw-r--r-- | modules/taxonomy/taxonomy.test | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/modules/taxonomy/taxonomy.test b/modules/taxonomy/taxonomy.test index 9f36b680e..531d94812 100644 --- a/modules/taxonomy/taxonomy.test +++ b/modules/taxonomy/taxonomy.test @@ -491,5 +491,12 @@ class TaxonomyLoadMultipleUnitTest extends TaxonomyWebTestCase { $terms4 = taxonomy_term_load_multiple(NULL, array('vid' => $vocabulary->vid), TRUE); $this->assertTrue(count($terms4 == 4), t('Correct number of terms were loaded.')); $this->assertFalse(isset($terms4[$deleted->tid])); + + // Create a single term and load it by name. + $term = $this->createTerm($vocabulary->vid); + $loaded_terms = taxonomy_term_load_multiple(array(), array('name' => $term->name)); + $this->assertEqual(count($loaded_terms), 1, t('One term was loaded')); + $loaded_term = reset($loaded_terms); + $this->assertEqual($term->tid, $loaded_term->tid, t('Term loaded by name successfully.')); } } |