function EntityTestDateRangeTest::getNormalizedPostEntity

Same name in other branches
  1. 9 core/modules/datetime_range/tests/src/Functional/EntityResource/EntityTest/EntityTestDateRangeTest.php \Drupal\Tests\datetime_range\Functional\EntityResource\EntityTest\EntityTestDateRangeTest::getNormalizedPostEntity()
  2. 8.9.x core/modules/datetime_range/tests/src/Functional/EntityResource/EntityTest/EntityTestDateRangeTest.php \Drupal\Tests\datetime_range\Functional\EntityResource\EntityTest\EntityTestDateRangeTest::getNormalizedPostEntity()
  3. 10 core/modules/datetime_range/tests/src/Functional/EntityResource/EntityTest/EntityTestDateRangeTest.php \Drupal\Tests\datetime_range\Functional\EntityResource\EntityTest\EntityTestDateRangeTest::getNormalizedPostEntity()

Overrides EntityTestResourceTestBase::getNormalizedPostEntity

1 call to EntityTestDateRangeTest::getNormalizedPostEntity()
EntityTestDateRangeTest::assertNormalizationEdgeCases in core/modules/datetime_range/tests/src/Functional/EntityResource/EntityTest/EntityTestDateRangeTest.php
Asserts normalization-specific edge cases.

File

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

Class

EntityTestDateRangeTest
Tests the 'daterange' field's normalization.

Namespace

Drupal\Tests\datetime_range\Functional\EntityResource\EntityTest

Code

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

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.