1 contact.test ContactSitewideTestCase::deleteCategories()

Deletes all categories.

File

core/modules/contact/tests/contact.test, line 296
Tests for the Contact module.

Class

ContactSitewideTestCase
Tests the site-wide contact form.

Code

function deleteCategories() {
  $category_ids = $this->getCategories();
  foreach ($category_ids as $cid) {
    $category = contact_load($cid);
    $category_name = $category['category'];
    $this->backdropPost('admin/structure/contact/delete/' . $cid, array(), t('Delete'));
    $this->assertRaw(t('Contact form category %category has been deleted.', array('%category' => $category_name)), 'Category deleted successfully.');
  }
}