You are here

function CaptchaTestCase::testCaptchaOnLoginBlockOnAdminPagesIssue893810 in CAPTCHA 6.2

Same name and namespace in other branches
  1. 7 captcha.test \CaptchaTestCase::testCaptchaOnLoginBlockOnAdminPagesIssue893810()

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

File

./captcha.test, line 380
Tests for CAPTCHA module.

Class

CaptchaTestCase

Code

function testCaptchaOnLoginBlockOnAdminPagesIssue893810() {

  // Set a CAPTCHA on login block form
  captcha_set_form_id_setting('user_login_block', 'captcha/Math');

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

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