1.20.x contact.test ContactSitewideTestCase::addCategory($category, $recipients, $reply, $selected)

Adds a category.

Parameters

string $category: The category name.

string $recipients: The list of recipient e-mail addresses.

string $reply: The auto-reply text that is sent to a user upon completing the contact form.

boolean $selected: Boolean indicating whether the category should be selected by default.

File

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

Class

ContactSitewideTestCase
Tests the site-wide contact form.

Code

function addCategory($category, $recipients, $reply, $selected) {
  $edit = array();
  $edit['category'] = $category;
  $edit['recipients'] = $recipients;
  $edit['reply'] = $reply;
  $edit['selected'] = ($selected ? '1' : '0');
  $this->backdropPost('admin/structure/contact/add', $edit, t('Save'));
}