protected function BotchaBaseWebTestCase::getFormBuildIdFromForm in BOTCHA Spam Prevention 6
Same name and namespace in other branches
- 6.2 botcha.test \BotchaBaseWebTestCase::getFormBuildIdFromForm()
- 6.3 tests/botcha.simpletest.test \BotchaBaseWebTestCase::getFormBuildIdFromForm()
- 7 botcha.test \BotchaBaseWebTestCase::getFormBuildIdFromForm()
- 7.2 botcha.test \BotchaBaseWebTestCase::getFormBuildIdFromForm()
- 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 193 - Tests for BOTCHA module.
Class
- BotchaBaseWebTestCase
- Base class for BOTCHA tests.
Code
protected function getFormBuildIdFromForm() {
$elements = $this
->xpath('//input[@name="form_build_id"]');
$form_build_id = isset($elements[0]['value']) ? $elements[0]['value'] : FALSE;
debug('$form_build_id value=' . $form_build_id . '<br>elements=<pre>' . print_r($elements, 1) . '</pre>');
return $form_build_id;
}