1 form.test protected FormsFormStoragePageCacheTestCase::getFormBuildId()

Return the build id of the current form.

File

core/modules/simpletest/tests/form.test, line 1373
Unit tests for the Backdrop 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('//main//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'];
}