You are here

protected function BotchaUsingJsTestCase::assertBotchaPresence in BOTCHA Spam Prevention 7.2

Same name and namespace in other branches
  1. 6.2 botcha.test \BotchaUsingJsTestCase::assertBotchaPresence()
  2. 6.3 tests/botcha.simpletest.test \BotchaUsingJsTestCase::assertBotchaPresence()
  3. 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

./botcha.test, line 1021
Tests for BOTCHA module.

Class

BotchaUsingJsTestCase

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');
  }
}