Updated Drupal to 8.6. This goes with the following updates because it's possible...
[yaffs-website] / web / core / tests / Drupal / KernelTests / Core / Entity / FieldWidgetConstraintValidatorTest.php
index 21eb4d97ee7f01051d7fe8cd60c88d04473ef460..d3d5e5b1d41376452e57838f8e1fffdfcb053761 100644 (file)
@@ -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();