Deletes all categories.
function deleteCategories() {
$categories = entity_load_multiple('contact_category');
foreach ($categories as $id => $category) {
$this
->drupalPost("admin/structure/contact/manage/{$id}/delete", array(), t('Delete'));
$this
->assertRaw(t('Category %label has been deleted.', array(
'%label' => $category
->label(),
)));
$this
->assertFalse(entity_load('contact_category', $id), format_string('Category %category not found', array(
'%category' => $category
->label(),
)));
}
}