function AjaxFormPageCacheTest::getFormBuildId
Return the build id of the current form.
1 call to AjaxFormPageCacheTest::getFormBuildId()
- AjaxFormPageCacheTest::testSimpleAJAXFormValue in core/
tests/ Drupal/ FunctionalJavascriptTests/ Ajax/ AjaxFormPageCacheTest.php  - Create a simple form, then submit the form via AJAX to change to it.
 
File
- 
              core/
tests/ Drupal/ FunctionalJavascriptTests/ Ajax/ AjaxFormPageCacheTest.php, line 40  
Class
- AjaxFormPageCacheTest
 - Performs tests on AJAX forms in cached pages.
 
Namespace
Drupal\FunctionalJavascriptTests\AjaxCode
protected function getFormBuildId() {
  // Ensure the hidden 'form_build_id' field is unique.
  $this->assertSession()
    ->elementsCount('xpath', '//input[@name="form_build_id"]', 1);
  return $this->assertSession()
    ->hiddenFieldExists('form_build_id')
    ->getValue();
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.