protected function AJAXFormPageCacheTestCase::getFormBuildId

Return the build id of the current form.

1 call to AJAXFormPageCacheTestCase::getFormBuildId()
AJAXFormPageCacheTestCase::testSimpleAJAXFormValue in drupal/modules/simpletest/tests/ajax.test
Create a simple form, then POST to system/ajax to change to it.

File

drupal/modules/simpletest/tests/ajax.test, line 531

Class

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