protected function BotchaBaseWebTestCase::assertBotchaPresence in BOTCHA Spam Prevention 6
Same name and namespace in other branches
- 6.2 botcha.test \BotchaBaseWebTestCase::assertBotchaPresence()
- 6.3 tests/botcha.simpletest.test \BotchaBaseWebTestCase::assertBotchaPresence()
- 7 botcha.test \BotchaBaseWebTestCase::assertBotchaPresence()
- 7.2 botcha.test \BotchaBaseWebTestCase::assertBotchaPresence()
- 7.3 tests/botcha.simpletest.test \BotchaBaseWebTestCase::assertBotchaPresence()
Assert that there is a BOTCHA on the form or not.
Parameters
bool $presence whether there should be a BOTCHA or not.:
10 calls to BotchaBaseWebTestCase::assertBotchaPresence()
- BotchaAdminTestCase::testUntrustedUserPosting in ./
botcha.test - BotchaSessionReuseAttackTestCase::testBotchaSessionReuseAttackDetectionOnCommentPreview in ./
botcha.test - BotchaSessionReuseAttackTestCase::testBotchaSessionReuseAttackDetectionOnLoginForm in ./
botcha.test - BotchaSessionReuseAttackTestCase::testBotchaSessionReuseAttackDetectionOnNodeForm in ./
botcha.test - BotchaTestCase::assertCommentPosting in ./
botcha.test - Assert function for testing if comment posting works as it should.
File
- ./
botcha.test, line 118 - Tests for BOTCHA module.
Class
- BotchaBaseWebTestCase
- Base class for BOTCHA tests.
Code
protected function assertBotchaPresence($presence) {
if ($presence) {
$this
->assertText('If you\'re a human, don\'t change the following field', 'There should be a BOTCHA on the form.', 'BOTCHA');
}
else {
$this
->assertNoText('If you\'re a human, don\'t change the following field', 'There should be no BOTCHA on the form.', 'BOTCHA');
}
}