protected function BotchaBaseWebTestCase::assertBotchaResponseAccepted in BOTCHA Spam Prevention 7
Same name and namespace in other branches
- 6 botcha.test \BotchaBaseWebTestCase::assertBotchaResponseAccepted()
- 6.2 botcha.test \BotchaBaseWebTestCase::assertBotchaResponseAccepted()
- 6.3 tests/botcha.simpletest.test \BotchaBaseWebTestCase::assertBotchaResponseAccepted()
- 7.2 botcha.test \BotchaBaseWebTestCase::assertBotchaResponseAccepted()
- 7.3 tests/botcha.simpletest.test \BotchaBaseWebTestCase::assertBotchaResponseAccepted()
Assert that the response is accepted: no "unknown CSID" message, no "CSID reuse attack detection" message, no "wrong answer" message.
6 calls to BotchaBaseWebTestCase::assertBotchaResponseAccepted()
- BotchaSessionReuseAttackTestCase::testBotchaSessionReuseAttackDetectionOnCommentPreview in ./
botcha.test - BotchaSessionReuseAttackTestCase::testBotchaSessionReuseAttackDetectionOnLoginForm in ./
botcha.test - BotchaSessionReuseAttackTestCase::testBotchaSessionReuseAttackDetectionOnNodeForm in ./
botcha.test - BotchaSessionReuseAttackTestCase::testMultipleBotchaProtectedFormsOnOnePage in ./
botcha.test - BotchaTestCase::assertCommentPosting in ./
botcha.test - Assert function for testing if comment posting works as it should.
File
- ./
botcha.test, line 102 - Tests for BOTCHA module.
Class
- BotchaBaseWebTestCase
- Base class for BOTCHA tests.
Code
protected function assertBotchaResponseAccepted() {
// There should be no error message about unknown BOTCHA session ID.
$this
->assertNoText(t(BOTCHA_UNKNOWN_CSID_ERROR_MESSAGE), 'BOTCHA response should be accepted (known CSID).', 'BOTCHA');
// There should be no error message about CSID reuse attack.
$this
->assertNoText(t(BOTCHA_SESSION_REUSE_ATTACK_ERROR_MESSAGE), 'BOTCHA response should be accepted (no BOTCHA session reuse attack detection).', 'BOTCHA');
// There should be no error message about wrong response.
$this
->assertNoText(t(BOTCHA_NO_JS_ERROR_MESSAGE), 'BOTCHA response should be accepted (JS enabled).', 'BOTCHA');
}