1 ajax.test protected AJAXFormPageCacheTestCase::getFormBuildId()

Return the build id of the current form.

File

core/modules/simpletest/tests/ajax.test, line 496
Ajax Tests.

Class

AJAXFormPageCacheTestCase
Test Ajax forms 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'];
}