You are here

protected function EntityTestDateRangeTest::getExpectedNormalizedEntity in Drupal 8

Same name and namespace in other branches
  1. 9 core/modules/datetime_range/tests/src/Functional/EntityResource/EntityTest/EntityTestDateRangeTest.php \Drupal\Tests\datetime_range\Functional\EntityResource\EntityTest\EntityTestDateRangeTest::getExpectedNormalizedEntity()
  2. 10 core/modules/datetime_range/tests/src/Functional/EntityResource/EntityTest/EntityTestDateRangeTest.php \Drupal\Tests\datetime_range\Functional\EntityResource\EntityTest\EntityTestDateRangeTest::getExpectedNormalizedEntity()

Returns the expected normalization of the entity.

Return value

array

Overrides EntityTestResourceTestBase::getExpectedNormalizedEntity

See also

::createEntity()

File

core/modules/datetime_range/tests/src/Functional/EntityResource/EntityTest/EntityTestDateRangeTest.php, line 93

Class

EntityTestDateRangeTest
Tests the 'daterange' field's normalization.

Namespace

Drupal\Tests\datetime_range\Functional\EntityResource\EntityTest

Code

protected function getExpectedNormalizedEntity() {
  return parent::getExpectedNormalizedEntity() + [
    static::$fieldName => [
      [
        'value' => '2017-03-02T07:02:00+11:00',
        'end_value' => '2017-03-02T07:02:00+11:00',
      ],
    ],
  ];
}