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