diff core/modules/serialization/tests/src/Kernel/EntitySerializationTest.php @ 4:a9cd425dd02b

Update, including to Drupal core 8.6.10
author Chris Cannam
date Thu, 28 Feb 2019 13:11:55 +0000
parents c75dbcec494b
children 12f9dff5fda9
line wrap: on
line diff
--- a/core/modules/serialization/tests/src/Kernel/EntitySerializationTest.php	Thu Feb 28 11:14:44 2019 +0000
+++ b/core/modules/serialization/tests/src/Kernel/EntitySerializationTest.php	Thu Feb 28 13:11:55 2019 +0000
@@ -3,7 +3,8 @@
 namespace Drupal\Tests\serialization\Kernel;
 
 use Drupal\Component\Serialization\Json;
-use Drupal\Component\Utility\SafeMarkup;
+use Drupal\Component\Render\FormattableMarkup;
+use Drupal\entity_test\Entity\EntitySerializedField;
 use Drupal\entity_test\Entity\EntityTestMulRev;
 use Drupal\filter\Entity\FilterFormat;
 use Drupal\Tests\rest\Functional\BcTimestampNormalizerUnixTestTrait;
@@ -48,7 +49,7 @@
   /**
    * The serializer service.
    *
-   * @var \Symfony\Component\Serializer\Serializer.
+   * @var \Symfony\Component\Serializer\Serializer
    */
   protected $serializer;
 
@@ -253,7 +254,7 @@
 
     foreach (['json', 'xml'] as $type) {
       $denormalized = $this->serializer->denormalize($normalized, $this->entityClass, $type, ['entity_type' => 'entity_test_mulrev']);
-      $this->assertTrue($denormalized instanceof $this->entityClass, SafeMarkup::format('Denormalized entity is an instance of @class', ['@class' => $this->entityClass]));
+      $this->assertTrue($denormalized instanceof $this->entityClass, new FormattableMarkup('Denormalized entity is an instance of @class', ['@class' => $this->entityClass]));
       $this->assertIdentical($denormalized->getEntityTypeId(), $this->entity->getEntityTypeId(), 'Expected entity type found.');
       $this->assertIdentical($denormalized->bundle(), $this->entity->bundle(), 'Expected entity bundle found.');
       $this->assertIdentical($denormalized->uuid(), $this->entity->uuid(), 'Expected entity UUID found.');