protected function BotchaBaseWebTestCase::assertBotchaPresence in BOTCHA Spam Prevention 6.2
Same name and namespace in other branches
- 6 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.:
2 calls to BotchaBaseWebTestCase::assertBotchaPresence()
- BotchaBaseWebTestCase::assertCommentFormSubmission in ./
botcha.test - Assert function for testing if comment posting works as it should.
- BotchaBaseWebTestCase::getForm in ./
botcha.test - Get one of predefined forms. Used to unify the process of testing.
3 methods override BotchaBaseWebTestCase::assertBotchaPresence()
- BotchaNoResubmitTestCase::assertBotchaPresence in ./
botcha.test - Assert that there is a BOTCHA on the form or not.
- BotchaTimegateTestCase::assertBotchaPresence in ./
botcha.test - Assert that there is a BOTCHA on the form or not.
- BotchaUsingJsTestCase::assertBotchaPresence in ./
botcha.test - Assert that there is a BOTCHA on the form or not.
File
- ./
botcha.test, line 108 - 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');
}
}