function ContactPersonalTestCase::submitPersonalContact
Fills out a user's personal contact form and submits it.
Parameters
$account: A user object of the user being contacted.
$message: An optional array with the form fields being used.
1 call to ContactPersonalTestCase::submitPersonalContact()
- ContactPersonalTestCase::testPersonalContactFlood in modules/
contact/ contact.test - Tests the personal contact form flood protection.
File
-
modules/
contact/ contact.test, line 449
Class
- ContactPersonalTestCase
- Tests the personal contact form.
Code
protected function submitPersonalContact($account, array $message = array()) {
$message += array(
'subject' => $this->randomName(16),
'message' => $this->randomName(64),
);
$this->drupalPost('user/' . $account->uid . '/contact', $message, t('Send message'));
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.