You are here

protected function BotchaBaseWebTestCase::getFormBuildIdFromForm in BOTCHA Spam Prevention 7

Same name and namespace in other branches
  1. 6 botcha.test \BotchaBaseWebTestCase::getFormBuildIdFromForm()
  2. 6.2 botcha.test \BotchaBaseWebTestCase::getFormBuildIdFromForm()
  3. 6.3 tests/botcha.simpletest.test \BotchaBaseWebTestCase::getFormBuildIdFromForm()
  4. 7.2 botcha.test \BotchaBaseWebTestCase::getFormBuildIdFromForm()
  5. 7.3 tests/botcha.simpletest.test \BotchaBaseWebTestCase::getFormBuildIdFromForm()

Get the form_build_id from the current form in the browser.

3 calls to BotchaBaseWebTestCase::getFormBuildIdFromForm()
BotchaSessionReuseAttackTestCase::testBotchaSessionReuseAttackDetectionOnCommentPreview in ./botcha.test
BotchaSessionReuseAttackTestCase::testBotchaSessionReuseAttackDetectionOnLoginForm in ./botcha.test
BotchaSessionReuseAttackTestCase::testBotchaSessionReuseAttackDetectionOnNodeForm in ./botcha.test

File

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

Class

BotchaBaseWebTestCase
Base class for BOTCHA tests.

Code

protected function getFormBuildIdFromForm() {
  $form_build_id = current($this
    ->xpath('//input[@name="form_build_id"]/@value'));
  return $form_build_id;
}