function BotchaTimegateTestCase::assertFormSubmission in BOTCHA Spam Prevention 7.2
Same name and namespace in other branches
- 6.2 botcha.test \BotchaTimegateTestCase::assertFormSubmission()
- 6.3 tests/botcha.simpletest.test \BotchaTimegateTestCase::assertFormSubmission()
- 7.3 tests/botcha.simpletest.test \BotchaTimegateTestCase::assertFormSubmission()
Check whether our suspections are real.
Overrides BotchaBaseWebTestCase::assertFormSubmission
File
- ./
botcha.test, line 1275 - Tests for BOTCHA module.
Class
Code
function assertFormSubmission($form, $edit, $should_pass = TRUE, $button = NULL) {
switch ($form) {
case 'user_login':
case 'comment':
// Assertion itself.
switch ($should_pass) {
case FALSE:
// Check for error message.
$this
->assertText(BOTCHA_TIMEGATE_TIMEOUT_ERROR_MESSAGE, 'Submission should be blocked.', 'BOTCHA');
break;
}
break;
}
// We are placing it to the end since we have a redirection there which
// makes impossible to assert submission by these conditions.
parent::assertFormSubmission($form, $edit, $should_pass, $button);
}