X-Git-Url: http://www.aleph1.co.uk/gitweb/?p=yaffs-website;a=blobdiff_plain;f=web%2Fcore%2Fmodules%2Frest%2Ftests%2Fsrc%2FFunctional%2FEntityResource%2FEntityTestLabel%2FEntityTestLabelResourceTestBase.php;fp=web%2Fcore%2Fmodules%2Frest%2Ftests%2Fsrc%2FFunctional%2FEntityResource%2FEntityTestLabel%2FEntityTestLabelResourceTestBase.php;h=2257d6c275e1864e8557ce0d2a0f215806498aed;hp=d0307872f9691c555e5bc68c0900578d21355c14;hb=9917807b03b64faf00f6a1f29dcb6eafc454efa5;hpb=aea91e65e895364e460983b890e295aa5d5540a5 diff --git a/web/core/modules/rest/tests/src/Functional/EntityResource/EntityTestLabel/EntityTestLabelResourceTestBase.php b/web/core/modules/rest/tests/src/Functional/EntityResource/EntityTestLabel/EntityTestLabelResourceTestBase.php index d0307872f..2257d6c27 100644 --- a/web/core/modules/rest/tests/src/Functional/EntityResource/EntityTestLabel/EntityTestLabelResourceTestBase.php +++ b/web/core/modules/rest/tests/src/Functional/EntityResource/EntityTestLabel/EntityTestLabelResourceTestBase.php @@ -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',