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}
*/
],
],
'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_label',
+ 'type' => [
+ [
+ 'value' => 'entity_test_label',
+ ],
+ ],
'name' => [
[
'value' => 'label_llama',