protected function AjaxFormPageCacheTest::getFormBuildId in Drupal 9
Same name and namespace in other branches
- 8 core/tests/Drupal/FunctionalJavascriptTests/Ajax/AjaxFormPageCacheTest.php \Drupal\FunctionalJavascriptTests\Ajax\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 38
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();
}