You are here

public function HoneypotFormTestCase::testProtectRegisterUserNormal in Honeypot 7

Test user registration (anonymous users).

File

./honeypot.test, line 70
Testing for Honeypot module.

Class

HoneypotFormTestCase
Test the functionality of the Honeypot module for forms.

Code

public function testProtectRegisterUserNormal() {

  // Set up form and submit it.
  $edit['name'] = $this
    ->randomName();
  $edit['mail'] = $edit['name'] . '@example.com';
  $this
    ->drupalPost('user/register', $edit, t('Create new account'));

  // Form should have been submitted successfully.
  $this
    ->assertText(t('A welcome message with further instructions has been sent to your e-mail address.'), 'User registered successfully.');
}