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}
*/
]
],
'created' => [
- [
- 'value' => (int) $this->entity->get('created')->value,
- ]
+ $this->formatExpectedTimestampItemValues((int) $this->entity->get('created')->value)
],
'user_id' => [
[
*/
protected function getNormalizedPostEntity() {
return [
- 'type' => 'entity_test',
+ 'type' => [
+ [
+ 'value' => 'entity_test',
+ ],
+ ],
'name' => [
[
'value' => 'Dramallama',