function testTermDelete() {
$vocabulary = $this
->createVocabulary();
$valid_term = $this
->createTerm($vocabulary);
// Delete a valid term.
taxonomy_term_delete($valid_term->tid);
$terms = entity_load_multiple_by_properties('taxonomy_term', 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);
}