1 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.

File

core/modules/contact/tests/contact.test, line 471
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->backdropPost('user/' . $account->uid . '/contact', $message, t('Send message'));
}