Security update for Core, with self-updated composer
[yaffs-website] / web / core / modules / rest / tests / src / Functional / EntityResource / EntityTestLabel / EntityTestLabelResourceTestBase.php
index d0307872f9691c555e5bc68c0900578d21355c14..2257d6c275e1864e8557ce0d2a0f215806498aed 100644 (file)
@@ -3,11 +3,14 @@
 namespace Drupal\Tests\rest\Functional\EntityResource\EntityTestLabel;
 
 use Drupal\entity_test\Entity\EntityTestLabel;
+use Drupal\Tests\rest\Functional\BcTimestampNormalizerUnixTestTrait;
 use Drupal\Tests\rest\Functional\EntityResource\EntityResourceTestBase;
 use Drupal\user\Entity\User;
 
 abstract class EntityTestLabelResourceTestBase extends EntityResourceTestBase {
 
+  use BcTimestampNormalizerUnixTestTrait;
+
   /**
    * {@inheritdoc}
    */
@@ -94,9 +97,7 @@ abstract class EntityTestLabelResourceTestBase extends EntityResourceTestBase {
         ],
       ],
       'created' => [
-        [
-          'value' => (int) $this->entity->get('created')->value,
-        ],
+        $this->formatExpectedTimestampItemValues((int) $this->entity->get('created')->value),
       ],
       'user_id' => [
         [
@@ -116,7 +117,11 @@ abstract class EntityTestLabelResourceTestBase extends EntityResourceTestBase {
    */
   protected function getNormalizedPostEntity() {
     return [
-      'type' => 'entity_test_label',
+      'type' => [
+        [
+          'value' => 'entity_test_label',
+        ],
+      ],
       'name' => [
         [
           'value' => 'label_llama',