protected function FormsFormStoragePageCacheTestCase::getFormBuildId in Drupal 7
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 1368 - Unit tests for the Drupal Form API.
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'];
}