function ContactSitewideTestCase::submitContact

Submits the contact form.

Parameters

string $name: The name of the sender.

string $mail: The e-mail address of the sender.

string $subject: The subject of the message.

integer $cid: The category ID of the message.

string $message: The message body.

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

File

modules/contact/contact.test, line 264

Class

ContactSitewideTestCase
Tests the site-wide contact form.

Code

function submitContact($name, $mail, $subject, $cid, $message) {
    $edit = array();
    $edit['name'] = $name;
    $edit['mail'] = $mail;
    $edit['subject'] = $subject;
    $edit['cid'] = $cid;
    $edit['message'] = $message;
    $this->drupalPost('contact', $edit, t('Send message'));
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.