diff options
author | Dries Buytaert <dries@buytaert.net> | 2009-12-10 15:39:43 +0000 |
---|---|---|
committer | Dries Buytaert <dries@buytaert.net> | 2009-12-10 15:39:43 +0000 |
commit | c2f26d3368d38ce4d73aa0089d09d2d78ccf9285 (patch) | |
tree | 3db0c442068bd5bfb2a91e26675dfe9019cc8fab /modules/taxonomy | |
parent | 3016bcbd235b75e60a44566368c2d3702a625174 (diff) | |
download | brdo-c2f26d3368d38ce4d73aa0089d09d2d78ccf9285.tar.gz brdo-c2f26d3368d38ce4d73aa0089d09d2d78ccf9285.tar.bz2 |
- Patch #653940 by sun: tests weren't reporting all errors.
Diffstat (limited to 'modules/taxonomy')
-rw-r--r-- | modules/taxonomy/taxonomy.module | 3 | ||||
-rw-r--r-- | modules/taxonomy/taxonomy.test | 6 |
2 files changed, 6 insertions, 3 deletions
diff --git a/modules/taxonomy/taxonomy.module b/modules/taxonomy/taxonomy.module index 4cc5de737..290162e26 100644 --- a/modules/taxonomy/taxonomy.module +++ b/modules/taxonomy/taxonomy.module @@ -903,7 +903,8 @@ function taxonomy_vocabulary_load_multiple($vids = array(), $conditions = array( * Results are statically cached. */ function taxonomy_vocabulary_load($vid) { - return reset(taxonomy_vocabulary_load_multiple(array($vid))); + $vocabularies = taxonomy_vocabulary_load_multiple(array($vid)); + return reset($vocabularies); } /** diff --git a/modules/taxonomy/taxonomy.test b/modules/taxonomy/taxonomy.test index 726f29f15..025e902f3 100644 --- a/modules/taxonomy/taxonomy.test +++ b/modules/taxonomy/taxonomy.test @@ -441,7 +441,8 @@ class TaxonomyTermTestCase extends TaxonomyWebTestCase { // Create the term to edit. $this->drupalPost('admin/structure/taxonomy/' . $this->vocabulary->vid . '/add', $edit, t('Save')); - $term = reset(taxonomy_get_term_by_name($edit['name'])); + $terms = taxonomy_get_term_by_name($edit['name']); + $term = reset($terms); $this->assertNotNull($term, t('Term found in database')); // Submitting a term takes us to the add page; we need the List page. @@ -672,7 +673,8 @@ class TaxonomyHooksTestCase extends TaxonomyWebTestCase { 'antonym' => 'Long', ); $this->drupalPost('admin/structure/taxonomy/' . $vocabulary->vid . '/add', $edit, t('Save')); - $term = reset(taxonomy_get_term_by_name($edit['name'])); + $terms = taxonomy_get_term_by_name($edit['name']); + $term = reset($terms); $this->assertEqual($term->antonym, $edit['antonym'], t('Antonym was loaded into the term object')); // Update the term with a different antonym. |