diff --git a/core/modules/system/tests/modules/ajax_test/lib/Drupal/ajax_test/Form/AjaxTestDialogForm.php b/core/modules/system/tests/modules/ajax_test/lib/Drupal/ajax_test/Form/AjaxTestDialogForm.php index 1c90b8b..7f7d0da 100644 --- a/core/modules/system/tests/modules/ajax_test/lib/Drupal/ajax_test/Form/AjaxTestDialogForm.php +++ b/core/modules/system/tests/modules/ajax_test/lib/Drupal/ajax_test/Form/AjaxTestDialogForm.php @@ -8,6 +8,8 @@ namespace Drupal\ajax_test\Form; use Drupal\Core\Form\FormInterface; +use Drupal\Core\Form\FormBase; +use Drupal\Component\Utility\String; use Drupal\Core\Ajax\AjaxResponse; use Drupal\Core\Ajax\OpenModalDialogCommand; use Drupal\Core\Ajax\OpenDialogCommand; @@ -15,7 +17,7 @@ /** * Dummy form for testing DialogController with _form routes. */ -class AjaxTestDialogForm implements FormInterface { +class AjaxTestDialogForm extends FormBase implements FormInterface { /** * {@inheritdoc} @@ -96,7 +98,7 @@ public function nonModal(&$form, &$form_state) { protected function dialog($is_modal = FALSE) { $content = ajax_test_dialog_contents(); $response = new AjaxResponse(); - $title = t('AJAX Dialog contents'); + $title = $this->t(String::checkPlain('AJAX Dialog contents')); $html = drupal_render($content); if ($is_modal) { $response->addCommand(new OpenModalDialogCommand($title, $html));