diff --git a/core/modules/image/src/Tests/ImageAdminStylesTest.php b/core/modules/image/src/Tests/ImageAdminStylesTest.php index 35786c1..ed7b8e5 100644 --- a/core/modules/image/src/Tests/ImageAdminStylesTest.php +++ b/core/modules/image/src/Tests/ImageAdminStylesTest.php @@ -307,8 +307,10 @@ function testAjaxEnabledEffectForm() { // Edit back the effects. foreach ($style->getEffects() as $uuid => $effect) { - $effect_path = $style_path = $admin_path . '/manage/' . $style_name . '/effects/' . $uuid; - $this->drupalPostForm($effect_path, $effect_edit, t('Update effect')); + $effect_path = $admin_path . '/manage/' . $style_name . '/effects/' . $uuid; + $this->drupalGet($effect_path); + $this->drupalPostAjaxForm(NULL, $effect_edit, ['op' => t('Ajax refresh')]); + $this->drupalPostForm(NULL, $effect_edit, t('Update effect')); } } diff --git a/core/modules/image/tests/modules/image_module_test/src/Plugin/ImageEffect/AjaxTestImageEffect.php b/core/modules/image/tests/modules/image_module_test/src/Plugin/ImageEffect/AjaxTestImageEffect.php index 8e1e393..b4fa17e 100644 --- a/core/modules/image/tests/modules/image_module_test/src/Plugin/ImageEffect/AjaxTestImageEffect.php +++ b/core/modules/image/tests/modules/image_module_test/src/Plugin/ImageEffect/AjaxTestImageEffect.php @@ -69,7 +69,7 @@ public function ajaxCallback($form, FormStateInterface $form_state) { '#markup' => microtime(), ); $response = new AjaxResponse(); - $response->addCommand(new HtmlCommand('#ajax-value', drupal_render($item))); + $response->addCommand(new HtmlCommand('#ajax-value', $item)); return $response; }