You are here

function BotchaTestCase::testBotchaValidation in BOTCHA Spam Prevention 6

Same name and namespace in other branches
  1. 7 botcha.test \BotchaTestCase::testBotchaValidation()

Testing the case sensistive/insensitive validation.

File

./botcha.test, line 331
Tests for BOTCHA module.

Class

BotchaTestCase

Code

function testBotchaValidation() {

  // Set Test BOTCHA on comment form
  botcha_set_form_id_setting(self::COMMENT_FORM_ID, 'test');

  // Log in as normal user.
  $this
    ->drupalLogin($this->normal_user);
  $this
    ->assertCommentPosting(NULL, TRUE, 'Validation of right fields touched.');
  $this
    ->assertCommentPosting(NULL, FALSE, 'Validation of wrong fields touched.');
}