You are here

protected function BotchaTimegateTestCase::assertBotchaPresence in BOTCHA Spam Prevention 7.3

Same name and namespace in other branches
  1. 6.2 botcha.test \BotchaTimegateTestCase::assertBotchaPresence()
  2. 6.3 tests/botcha.simpletest.test \BotchaTimegateTestCase::assertBotchaPresence()
  3. 7.2 botcha.test \BotchaTimegateTestCase::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 1371
Simpletest-tests for BOTCHA module.

Class

BotchaTimegateTestCase

Code

protected function assertBotchaPresence($presence) {
  if ($presence) {
    $this
      ->assertField('timegate', 'There should be a BOTCHA timegate field on the form.', 'BOTCHA');
  }
  else {
    $this
      ->assertNoField('timegate', 'There should be no BOTCHA timegate field on the form.', 'BOTCHA');
  }
}