You are here

function BotchaTestCase::testBotchaOnLoginBlockOnAdminPages in BOTCHA Spam Prevention 7

Same name and namespace in other branches
  1. 6 botcha.test \BotchaTestCase::testBotchaOnLoginBlockOnAdminPages()

BOTCHA should also be put on admin pages if visitor has no access

File

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

Class

BotchaTestCase

Code

function testBotchaOnLoginBlockOnAdminPages() {

  // Set a BOTCHA on login block form
  botcha_set_form_id_setting('user_login_block', 'default');

  // Check if there is a BOTCHA on home page.
  $this
    ->drupalGet('node');
  $this
    ->assertBotchaPresence(TRUE);

  // Check there is a BOTCHA on "forbidden" admin pages
  $this
    ->drupalGet('admin');
  $this
    ->assertBotchaPresence(TRUE);
}