protected function ContactPersonalTestCase::submitPersonalContact in Drupal 7
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 - Tests for the Contact module.
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'));
}