function FormsFormStoragePageCacheTestCase::getFormBuildId
Return the build id of the current form.
2 calls to FormsFormStoragePageCacheTestCase::getFormBuildId()
- FormsFormStoragePageCacheTestCase::testRebuildFormStorageOnCachedPage in modules/
simpletest/ tests/ form.test - Build-id is regenerated when rebuilding cached form.
- FormsFormStoragePageCacheTestCase::testValidateFormStorageOnCachedPage in modules/
simpletest/ tests/ form.test - Build-id is regenerated when validating cached form.
File
-
modules/
simpletest/ tests/ form.test, line 1369
Class
- FormsFormStoragePageCacheTestCase
- Test the form storage when page caching for anonymous users is turned on.
Code
protected function getFormBuildId() {
$build_id_fields = $this->xpath('//input[@name="form_build_id"]');
$this->assertEqual(count($build_id_fields), 1, 'One form build id field on the page');
return (string) $build_id_fields[0]['value'];
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.