You are here

function BotchaBaseWebTestCase::checkPreConditions in BOTCHA Spam Prevention 7.3

Same name and namespace in other branches
  1. 6.2 botcha.test \BotchaBaseWebTestCase::checkPreConditions()
  2. 6.3 tests/botcha.simpletest.test \BotchaBaseWebTestCase::checkPreConditions()
  3. 7.2 botcha.test \BotchaBaseWebTestCase::checkPreConditions()
1 call to BotchaBaseWebTestCase::checkPreConditions()
BotchaTestCase::testFormSubmission in tests/botcha.simpletest.test

File

tests/botcha.simpletest.test, line 331
Simpletest-tests for BOTCHA module.

Class

BotchaBaseWebTestCase
Base class for BOTCHA tests.

Code

function checkPreConditions($form, $should_pass, $button) {
  switch ($form) {
    case 'comment':

      // Check that comment form is enabled.
      // @todo Abstract it.

      //$this->assertTrue(variable_get("botcha_enabled_comment_form", 0), "BOTCHA protection for comment_form must be enabled", 'BOTCHA');
      $this
        ->assertTrue(variable_get("botcha_enabled_comment_node_page_form", 0), "BOTCHA protection for comment_node_page_form must be enabled", 'BOTCHA');
      break;
  }
}