protected function ContactPersonalTestCase::submitPersonalContact
7.x contact.test | protected ContactPersonalTestCase::submitPersonalContact($account, array $message = array()) |
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 drupal-7.x/
modules/ contact/ contact.test - Tests the personal contact form flood protection.
File
- drupal-7.x/
modules/ contact/ contact.test, line 427 - 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'));
}