function AJAXFormPageCacheTestCase::getFormBuildId

Return the build id of the current form.

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

File

modules/simpletest/tests/ajax.test, line 535

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'];
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.