File
- core/modules/taxonomy/tests/taxonomy.test, line 441
- Tests for taxonomy.module.
Class
- TaxonomyTermUnitTest
- Unit tests for taxonomy term functions.
Code
function testTermDelete() {
$vocabulary = $this->createVocabulary();
$valid_term = $this->createTerm($vocabulary);
taxonomy_term_delete($valid_term->tid);
$terms = taxonomy_term_load_multiple(array(), array('vocabulary' => $vocabulary->machine_name));
$this->assertTrue(empty($terms), 'Vocabulary is empty after deletion.');
taxonomy_term_delete(42);
}