summaryrefslogtreecommitdiffstats
path: root/core/modules/system/tests/modules/form_test/src/Form/FormTestValidateForm.php
diff options
context:
space:
mode:
Diffstat (limited to 'core/modules/system/tests/modules/form_test/src/Form/FormTestValidateForm.php')
-rw-r--r--core/modules/system/tests/modules/form_test/src/Form/FormTestValidateForm.php2
1 files changed, 1 insertions, 1 deletions
diff --git a/core/modules/system/tests/modules/form_test/src/Form/FormTestValidateForm.php b/core/modules/system/tests/modules/form_test/src/Form/FormTestValidateForm.php
index 7123ace..a662e85 100644
--- a/core/modules/system/tests/modules/form_test/src/Form/FormTestValidateForm.php
+++ b/core/modules/system/tests/modules/form_test/src/Form/FormTestValidateForm.php
@@ -59,7 +59,7 @@ class FormTestValidateForm extends FormBase {
// Alter the submitted value in $form_state.
$form_state->setValueForElement($form['name'], 'value changed by setValueForElement() in #validate');
// Output the element's value from $form_state.
- drupal_set_message(t('@label value: @value', ['@label' => $form['name']['#title'], '@value' => $form_state->getValue('name')]));
+ $this->messenger()->addStatus($this->t('@label value: @value', ['@label' => $form['name']['#title'], '@value' => $form_state->getValue('name')]));
// Trigger a form validation error to see our changes.
$form_state->setErrorByName('');