You are here

protected function CaptchaSessionReuseAttackTestCase::assertCaptchaSessionIdReuseAttackDetection in CAPTCHA 6.2

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

Assert that the CAPTCHA session ID reuse attack was detected.

3 calls to CaptchaSessionReuseAttackTestCase::assertCaptchaSessionIdReuseAttackDetection()
CaptchaSessionReuseAttackTestCase::testCaptchaSessionReuseAttackDetectionOnCommentPreview in ./captcha.test
CaptchaSessionReuseAttackTestCase::testCaptchaSessionReuseAttackDetectionOnLoginForm in ./captcha.test
CaptchaSessionReuseAttackTestCase::testCaptchaSessionReuseAttackDetectionOnNodeForm in ./captcha.test

File

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

Class

CaptchaSessionReuseAttackTestCase

Code

protected function assertCaptchaSessionIdReuseAttackDetection() {
  $this
    ->assertText(t(CAPTCHA_SESSION_REUSE_ATTACK_ERROR_MESSAGE), 'CAPTCHA session ID reuse attack should be detected.', 'CAPTCHA');

  // There should be an error message about wrong response.
  $this
    ->assertText(t(CAPTCHA_WRONG_RESPONSE_ERROR_MESSAGE), 'CAPTCHA response should flagged as wrong.', 'CAPTCHA');
}