You are here

function ContactSitewideTestCase::addCategory in Contact 6.2

Same name and namespace in other branches
  1. 7.2 contact.test \ContactSitewideTestCase::addCategory()

Add a category.

Parameters

string $category Name of category.:

string $recipients List of recipient e-mail addresses.:

string $reply Auto-reply text.:

boolean $selected Defautly selected.:

2 calls to ContactSitewideTestCase::addCategory()
ContactSitewideTestCase::testAutoReply in ./contact.test
Test auto-reply on the site-wide contact form.
ContactSitewideTestCase::testSiteWideContact in ./contact.test
Test configuration options and site-wide contact form.

File

./contact.test, line 203

Class

ContactSitewideTestCase
Test the sitewide 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
    ->drupalPost('admin/structure/contact/add', $edit, t('Save'));
}