function ContactSitewideTestCase::updateCategory
Updates 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.
2 calls to ContactSitewideTestCase::updateCategory()
- ContactSitewideTestCase::testSiteWideContact in drupal-7.x/
modules/ contact/ contact.test - Tests configuration options and the site-wide contact form.
- ContactSitewideTestCase::testSiteWideContact in drupal-7.x/
modules/ contact/ contact.test - Tests configuration options and the site-wide contact form.
Archivo
- drupal-7.x/
modules/ contact/ contact.test, line 239 - Tests for the Contact module.
Class
- ContactSitewideTestCase
- Tests the site-wide contact form.
Código
function updateCategory($categories, $category, $recipients, $reply, $selected) {
$category_id = $categories[array_rand($categories)];
$edit = array();
$edit['category'] = $category;
$edit['recipients'] = $recipients;
$edit['reply'] = $reply;
$edit['selected'] = ($selected ? '1' : '0');
$this->drupalPost('admin/structure/contact/edit/' . $category_id, $edit, t('Save'));
return ($category_id);
}