You are here

protected function FormStoragePageCacheTest::getFormBuildId in Zircon Profile 8.0

Same name and namespace in other branches
  1. 8 core/modules/system/src/Tests/Form/FormStoragePageCacheTest.php \Drupal\system\Tests\Form\FormStoragePageCacheTest::getFormBuildId()

Return the build id of the current form.

2 calls to FormStoragePageCacheTest::getFormBuildId()
FormStoragePageCacheTest::testRebuildFormStorageOnCachedPage in core/modules/system/src/Tests/Form/FormStoragePageCacheTest.php
Build-id is regenerated when rebuilding cached form.
FormStoragePageCacheTest::testValidateFormStorageOnCachedPage in core/modules/system/src/Tests/Form/FormStoragePageCacheTest.php
Build-id is regenerated when validating cached form.

File

core/modules/system/src/Tests/Form/FormStoragePageCacheTest.php, line 38
Contains \Drupal\system\Tests\Form\FormStoragePageCacheTest.

Class

FormStoragePageCacheTest
Tests form storage from cached pages.

Namespace

Drupal\system\Tests\Form

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