X-Git-Url: http://www.aleph1.co.uk/gitweb/?p=yaffs-website;a=blobdiff_plain;f=web%2Fcore%2Ftests%2FDrupal%2FKernelTests%2FCore%2FEntity%2FFieldWidgetConstraintValidatorTest.php;fp=web%2Fcore%2Ftests%2FDrupal%2FKernelTests%2FCore%2FEntity%2FFieldWidgetConstraintValidatorTest.php;h=d3d5e5b1d41376452e57838f8e1fffdfcb053761;hp=21eb4d97ee7f01051d7fe8cd60c88d04473ef460;hb=0bf8d09d2542548982e81a441b1f16e75873a04f;hpb=74df008bdbb3a11eeea356744f39b802369bda3c diff --git a/web/core/tests/Drupal/KernelTests/Core/Entity/FieldWidgetConstraintValidatorTest.php b/web/core/tests/Drupal/KernelTests/Core/Entity/FieldWidgetConstraintValidatorTest.php index 21eb4d97e..d3d5e5b1d 100644 --- a/web/core/tests/Drupal/KernelTests/Core/Entity/FieldWidgetConstraintValidatorTest.php +++ b/web/core/tests/Drupal/KernelTests/Core/Entity/FieldWidgetConstraintValidatorTest.php @@ -2,7 +2,7 @@ namespace Drupal\KernelTests\Core\Entity; -use Drupal\Component\Utility\SafeMarkup; +use Drupal\Component\Render\FormattableMarkup; use Drupal\Core\Entity\EntityInterface; use Drupal\Core\Form\FormState; use Drupal\entity_test\Entity\EntityTestCompositeConstraint; @@ -136,7 +136,7 @@ class FieldWidgetConstraintValidatorTest extends KernelTestBase { $errors = $this->getErrorsForEntity($entity, ['name']); $this->assertFalse(isset($errors['name'])); $this->assertTrue(isset($errors['type'])); - $this->assertEqual($errors['type'], SafeMarkup::format('The validation failed because the value conflicts with the value in %field_name, which you cannot access.', ['%field_name' => 'name'])); + $this->assertEqual($errors['type'], new FormattableMarkup('The validation failed because the value conflicts with the value in %field_name, which you cannot access.', ['%field_name' => 'name'])); } /** @@ -144,7 +144,7 @@ class FieldWidgetConstraintValidatorTest extends KernelTestBase { */ public function testEntityLevelConstraintValidation() { $entity = EntityTestCompositeConstraint::create([ - 'name' => 'entity-level-violation' + 'name' => 'entity-level-violation', ]); $entity->save();