summaryrefslogtreecommitdiff
path: root/modules/taxonomy/taxonomy.test
diff options
context:
space:
mode:
authorDries Buytaert <dries@buytaert.net>2010-08-22 15:45:03 +0000
committerDries Buytaert <dries@buytaert.net>2010-08-22 15:45:03 +0000
commit1651cf34bfbdf02f6c03f8d00b025a610d24df23 (patch)
treec465620cce66fa7937a8b5f7b26cd7434adef819 /modules/taxonomy/taxonomy.test
parent153ef8bd7b79fa4063a3994cd653721249e9c465 (diff)
downloadbrdo-1651cf34bfbdf02f6c03f8d00b025a610d24df23.tar.gz
brdo-1651cf34bfbdf02f6c03f8d00b025a610d24df23.tar.bz2
- Patch #841798 by klausi: error deleting an invalid term.
Diffstat (limited to 'modules/taxonomy/taxonomy.test')
-rw-r--r--modules/taxonomy/taxonomy.test12
1 files changed, 12 insertions, 0 deletions
diff --git a/modules/taxonomy/taxonomy.test b/modules/taxonomy/taxonomy.test
index af50e5346..a9938b087 100644
--- a/modules/taxonomy/taxonomy.test
+++ b/modules/taxonomy/taxonomy.test
@@ -337,6 +337,18 @@ class TaxonomyTermUnitTest extends TaxonomyWebTestCase {
'group' => 'Taxonomy',
);
}
+
+ function testTermDelete() {
+ $vocabulary = $this->createVocabulary();
+ $valid_term = $this->createTerm($vocabulary);
+ // Delete a valid term.
+ taxonomy_term_delete($valid_term->tid);
+ $terms = taxonomy_term_load_multiple(array(), array('vid' => $vocabulary->vid));
+ $this->assertTrue(empty($terms), 'Vocabulary is empty after deletion');
+
+ // Delete an invalid term. Should not throw any notices.
+ taxonomy_term_delete(42);
+ }
}
/**