From da4cd3cc8cb6a644138e72ed56972b4f0f5a0033 Mon Sep 17 00:00:00 2001 From: Dries Buytaert Date: Fri, 19 Dec 2008 15:34:27 +0000 Subject: - Patch #343746 by asimmonds: fixed typo in loading multiple terms at once. Added a test for it too\! --- modules/taxonomy/taxonomy.test | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'modules/taxonomy/taxonomy.test') 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.')); } } -- cgit v1.2.3