function BotchaBaseWebTestCase::checkPreConditions in BOTCHA Spam Prevention 7.3
Same name and namespace in other branches
- 6.2 botcha.test \BotchaBaseWebTestCase::checkPreConditions()
- 6.3 tests/botcha.simpletest.test \BotchaBaseWebTestCase::checkPreConditions()
- 7.2 botcha.test \BotchaBaseWebTestCase::checkPreConditions()
1 call to BotchaBaseWebTestCase::checkPreConditions()
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;
}
}