X-Git-Url: http://www.aleph1.co.uk/gitweb/?a=blobdiff_plain;f=web%2Fcore%2Fmodules%2Frest%2Ftests%2Fsrc%2FFunctional%2FEntityResource%2FEntityTest%2FEntityTestResourceTestBase.php;fp=web%2Fcore%2Fmodules%2Frest%2Ftests%2Fsrc%2FFunctional%2FEntityResource%2FEntityTest%2FEntityTestResourceTestBase.php;h=e2c0ccdf652ef1124151abc24b8d3552cb374fba;hb=9917807b03b64faf00f6a1f29dcb6eafc454efa5;hp=2935a00fa72faac6010c9fe07ced155a54559e8a;hpb=aea91e65e895364e460983b890e295aa5d5540a5;p=yaffs-website diff --git a/web/core/modules/rest/tests/src/Functional/EntityResource/EntityTest/EntityTestResourceTestBase.php b/web/core/modules/rest/tests/src/Functional/EntityResource/EntityTest/EntityTestResourceTestBase.php index 2935a00fa..e2c0ccdf6 100644 --- a/web/core/modules/rest/tests/src/Functional/EntityResource/EntityTest/EntityTestResourceTestBase.php +++ b/web/core/modules/rest/tests/src/Functional/EntityResource/EntityTest/EntityTestResourceTestBase.php @@ -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',