diff --git a/core/lib/Drupal/Core/Ajax/UpdateBuildIdCommand.php b/core/lib/Drupal/Core/Ajax/UpdateBuildIdCommand.php index e034bdb..5eefc6f 100644 --- a/core/lib/Drupal/Core/Ajax/UpdateBuildIdCommand.php +++ b/core/lib/Drupal/Core/Ajax/UpdateBuildIdCommand.php @@ -14,7 +14,7 @@ * * The primary use case for this Ajax command is to serve a new build ID to a * form served from the cache to an anonymous user, preventing one anonymous - * user from accessing the form state of another anonymous users on Ajax enabled + * user from accessing the form state of another anonymous user on Ajax enabled * forms. * * This command is implemented by Drupal.AjaxCommands.prototype.update_build_id() diff --git a/core/lib/Drupal/Core/Form/FormCache.php b/core/lib/Drupal/Core/Form/FormCache.php index ddc05a0..4cc3f40 100644 --- a/core/lib/Drupal/Core/Form/FormCache.php +++ b/core/lib/Drupal/Core/Form/FormCache.php @@ -194,7 +194,7 @@ public function setCache($form_build_id, $form, FormStateInterface $form_state) } /** - * Wraps drupal_page_is_cacheable(). + * Checks if the page is cacheable. */ protected function isPageCacheable($allow_caching = NULL) { $request_policy = \Drupal::service('page_cache_request_policy'); diff --git a/core/modules/system/src/Tests/Form/StorageTest.php b/core/modules/system/src/Tests/Form/StorageTest.php index 147cbc6..c8a4dc8 100644 --- a/core/modules/system/src/Tests/Form/StorageTest.php +++ b/core/modules/system/src/Tests/Form/StorageTest.php @@ -164,7 +164,7 @@ function testFormStatePersist() { * Verify that the form build-id remains the same when validation errors * occur on a mutable form. */ - function testMutableForm() { + public function testMutableForm() { // Request the form with 'cache' query parameter to enable form caching. $this->drupalGet('form_test/form-storage', ['query' => ['cache' => 1]]); $buildIdFields = $this->xpath('//input[@name="form_build_id"]'); @@ -183,7 +183,7 @@ function testMutableForm() { * Verifies that form build-id is regenerated when loading an immutable form * from the cache. */ - function testImmutableForm() { + public function testImmutableForm() { // Request the form with 'cache' query parameter to enable form caching. $this->drupalGet('form_test/form-storage', ['query' => ['cache' => 1, 'immutable' => 1]]); $buildIdFields = $this->xpath('//input[@name="form_build_id"]'); diff --git a/core/modules/system/tests/modules/form_test/src/Controller/FormTestController.php b/core/modules/system/tests/modules/form_test/src/Controller/FormTestController.php index 302bb30..12a11cc 100644 --- a/core/modules/system/tests/modules/form_test/src/Controller/FormTestController.php +++ b/core/modules/system/tests/modules/form_test/src/Controller/FormTestController.php @@ -42,8 +42,8 @@ public function twoFormInstances() { * * Drupal 6 AHAH callbacks used to operate directly on forms retrieved using * form_get_cache and stored using form_set_cache after manipulation. This - * callback helps testing whether form_set_cache prevents resaving of immutable - * forms. + * callback helps testing whether form_set_cache prevents resaving of + * immutable forms. */ public function storageLegacyHandler($form_build_id) { $form_state = new FormState(); diff --git a/core/modules/system/tests/modules/form_test/src/Form/FormTestStorageForm.php b/core/modules/system/tests/modules/form_test/src/Form/FormTestStorageForm.php index dc44491..60e0cdb 100644 --- a/core/modules/system/tests/modules/form_test/src/Form/FormTestStorageForm.php +++ b/core/modules/system/tests/modules/form_test/src/Form/FormTestStorageForm.php @@ -88,7 +88,7 @@ public function buildForm(array $form, FormStateInterface $form_state) { $form_state->setCached(); } - if (\Drupal::request()->get('immutable')) { + if ($this->getRequest()->get('immutable')) { $form_state->addBuildInfo('immutable', TRUE); }