Security update for Core, with self-updated composer
[yaffs-website] / web / core / modules / rest / tests / src / Functional / EntityResource / EntityTest / EntityTestResourceTestBase.php
index 2935a00fa72faac6010c9fe07ced155a54559e8a..e2c0ccdf652ef1124151abc24b8d3552cb374fba 100644 (file)
@@ -3,11 +3,14 @@
 namespace Drupal\Tests\rest\Functional\EntityResource\EntityTest;
 
 use Drupal\entity_test\Entity\EntityTest;
+use Drupal\Tests\rest\Functional\BcTimestampNormalizerUnixTestTrait;
 use Drupal\Tests\rest\Functional\EntityResource\EntityResourceTestBase;
 use Drupal\user\Entity\User;
 
 abstract class EntityTestResourceTestBase extends EntityResourceTestBase {
 
+  use BcTimestampNormalizerUnixTestTrait;
+
   /**
    * {@inheritdoc}
    */
@@ -92,9 +95,7 @@ abstract class EntityTestResourceTestBase extends EntityResourceTestBase {
         ]
       ],
       'created' => [
-        [
-          'value' => (int) $this->entity->get('created')->value,
-        ]
+        $this->formatExpectedTimestampItemValues((int) $this->entity->get('created')->value)
       ],
       'user_id' => [
         [
@@ -115,7 +116,11 @@ abstract class EntityTestResourceTestBase extends EntityResourceTestBase {
    */
   protected function getNormalizedPostEntity() {
     return [
-      'type' => 'entity_test',
+      'type' => [
+        [
+          'value' => 'entity_test',
+        ],
+      ],
       'name' => [
         [
           'value' => 'Dramallama',