function ContactSitewideTest::updateCategory

Updates a category.

Parameters

string $id: The category machine name.

string $label: The category label.

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: A Boolean indicating whether the category should be selected by default.

1 call to ContactSitewideTest::updateCategory()
ContactSitewideTest::testSiteWideContact in drupal/core/modules/contact/lib/Drupal/contact/Tests/ContactSitewideTest.php
Tests configuration options and the site-wide contact form.

File

drupal/core/modules/contact/lib/Drupal/contact/Tests/ContactSitewideTest.php, line 279
Definition of Drupal\contact\Tests\ContactSitewideTest.

Class

ContactSitewideTest
Tests the site-wide contact form.

Namespace

Drupal\contact\Tests

Code

function updateCategory($id, $label, $recipients, $reply, $selected) {
  $edit = array();
  $edit['label'] = $label;
  $edit['recipients'] = $recipients;
  $edit['reply'] = $reply;
  $edit['selected'] = $selected ? TRUE : FALSE;
  $this
    ->drupalPost("admin/structure/contact/manage/{$id}", $edit, t('Save'));
}