Deletes a forum.
$tid: The forum ID.
function deleteForum($tid) {
// Delete the forum.
$this
->drupalPost('admin/structure/forum/edit/forum/' . $tid, array(), t('Delete'));
$this
->drupalPost(NULL, array(), t('Delete'));
// Assert that the forum no longer exists.
$this
->drupalGet('forum/' . $tid);
$this
->assertResponse(404, 'The forum was not found');
// Assert that the associated term has been removed from the
// forum_containers variable.
$containers = config('forum.settings')
->get('containers');
$this
->assertFalse(in_array($tid, $containers), 'The forum_containers variable has been updated.');
}