protected function BotchaUsingJsTestCase::assertBotchaPresence in BOTCHA Spam Prevention 6.3
Same name and namespace in other branches
- 6.2 botcha.test \BotchaUsingJsTestCase::assertBotchaPresence()
- 7.2 botcha.test \BotchaUsingJsTestCase::assertBotchaPresence()
- 7.3 tests/botcha.simpletest.test \BotchaUsingJsTestCase::assertBotchaPresence()
Assert that there is a BOTCHA on the form or not.
Parameters
bool $presence whether there should be a BOTCHA or not.:
Overrides BotchaBaseWebTestCase::assertBotchaPresence
File
- tests/
botcha.simpletest.test, line 1100 - Simpletest-tests for BOTCHA module.
Class
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');
}
}