diff --git a/core/modules/datetime/src/Tests/DateRangeFieldTest.php b/core/modules/datetime/src/Tests/DateRangeFieldTest.php index 3ba2533..f2e4f90 100644 --- a/core/modules/datetime/src/Tests/DateRangeFieldTest.php +++ b/core/modules/datetime/src/Tests/DateRangeFieldTest.php @@ -2,6 +2,7 @@ namespace Drupal\datetime\Tests; +use Drupal\Component\Render\FormattableMarkup; use Drupal\Component\Utility\SafeMarkup; use Drupal\Component\Utility\Unicode; use Drupal\Core\Datetime\DrupalDateTime; @@ -1089,7 +1090,7 @@ public function testInvalidField() { "{$field_name}[0][value2][time]" => '12:00:00', ]; $this->drupalPostForm(NULL, $edit, t('Save')); - $this->assertText(t('The @title end date cannot be before the start date', ['@title' => $field_name]), 'End date before start date has been caught.'); + $this->assertText(new FormattableMarkup('The @title end date cannot be before the start date', ['@title' => $field_name]), 'End date before start date has been caught.'); $edit = [ "{$field_name}[0][value][date]" => '2012-12-01', @@ -1098,7 +1099,7 @@ public function testInvalidField() { "{$field_name}[0][value2][time]" => '11:00:00', ]; $this->drupalPostForm(NULL, $edit, t('Save')); - $this->assertText(t('The @title end date cannot be before the start date', ['@title' => $field_name]), 'End time before start time has been caught.'); + $this->assertText(new FormattableMarkup('The @title end date cannot be before the start date', ['@title' => $field_name]), 'End time before start time has been caught.'); } /**