You are here

protected function CaptchaAdminTestCase::assertCaptchaSetting in CAPTCHA 7

Same name and namespace in other branches
  1. 6.2 captcha.test \CaptchaAdminTestCase::assertCaptchaSetting()

Helper function for checking CAPTCHA setting of a form.

Parameters

$form_id the form_id of the form to investigate.:

$challenge_type what the challenge type should be:: NULL, 'none', 'default' or something like 'captcha/Math'

1 call to CaptchaAdminTestCase::assertCaptchaSetting()
CaptchaAdminTestCase::testCaptchAdminLinks in ./captcha.test
Testing of the CAPTCHA administration links.

File

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

Class

CaptchaAdminTestCase

Code

protected function assertCaptchaSetting($form_id, $challenge_type) {
  $result = captcha_get_form_id_setting(self::COMMENT_FORM_ID, TRUE);
  $this
    ->assertEqual($result, $challenge_type, t('Check CAPTCHA setting for form: expected: @expected, received: @received.', array(
    '@expected' => var_export($challenge_type, TRUE),
    '@received' => var_export($result, TRUE),
  )), 'CAPTCHA');
}