summaryrefslogtreecommitdiffstats
path: root/core/modules/system/tests/modules/entity_test/src/EntityTestForm.php
diff options
context:
space:
mode:
Diffstat (limited to 'core/modules/system/tests/modules/entity_test/src/EntityTestForm.php')
-rw-r--r--core/modules/system/tests/modules/entity_test/src/EntityTestForm.php4
1 files changed, 2 insertions, 2 deletions
diff --git a/core/modules/system/tests/modules/entity_test/src/EntityTestForm.php b/core/modules/system/tests/modules/entity_test/src/EntityTestForm.php
index 75ff8ad..d471d60 100644
--- a/core/modules/system/tests/modules/entity_test/src/EntityTestForm.php
+++ b/core/modules/system/tests/modules/entity_test/src/EntityTestForm.php
@@ -65,7 +65,7 @@ class EntityTestForm extends ContentEntityForm {
else {
$message = t('%entity_type @id has been updated.', ['@id' => $entity->id(), '%entity_type' => $entity->getEntityTypeId()]);
}
- drupal_set_message($message);
+ $this->messenger()->addStatus($message);
if ($entity->id()) {
$entity_type = $entity->getEntityTypeId();
@@ -76,7 +76,7 @@ class EntityTestForm extends ContentEntityForm {
}
else {
// Error on save.
- drupal_set_message(t('The entity could not be saved.'), 'error');
+ $this->messenger()->addError($this->t('The entity could not be saved.'));
$form_state->setRebuild();
}
}