You are here

protected function ContactPersonalTestCase::submitPersonalContact in Contact 7.2

Same name and namespace in other branches
  1. 6.2 contact.test \ContactPersonalTestCase::submitPersonalContact()

Fill out a user's personal contact form and submit.

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 ./contact.test
Test the personal contact form flood protection.

File

./contact.test, line 409
Tests for contact.module.

Class

ContactPersonalTestCase
Test 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'));
}