public function HoneypotFormTestCase::testProtectRegisterUserTooFast in Honeypot 7
File
- ./honeypot.test, line 91
- Testing for Honeypot module.
Class
- HoneypotFormTestCase
- Test the functionality of the Honeypot module for forms.
Code
public function testProtectRegisterUserTooFast() {
variable_set('honeypot_time_limit', 5);
$edit['name'] = $this
->randomName();
$edit['mail'] = $edit['name'] . '@example.com';
$this
->drupalPost('user/register', $edit, t('Create new account'));
$this
->assertText(t('There was a problem with your form submission. Please wait 6 seconds and try again.'), 'Registration form protected by time limit.');
}