function EntityTestDatetimeTest::getExpectedNormalizedEntity

Same name in other branches
  1. 9 core/modules/datetime/tests/src/Functional/EntityResource/EntityTest/EntityTestDatetimeTest.php \Drupal\Tests\datetime\Functional\EntityResource\EntityTest\EntityTestDatetimeTest::getExpectedNormalizedEntity()
  2. 8.9.x core/modules/datetime/tests/src/Functional/EntityResource/EntityTest/EntityTestDatetimeTest.php \Drupal\Tests\datetime\Functional\EntityResource\EntityTest\EntityTestDatetimeTest::getExpectedNormalizedEntity()
  3. 11.x core/modules/datetime/tests/src/Functional/EntityResource/EntityTest/EntityTestDatetimeTest.php \Drupal\Tests\datetime\Functional\EntityResource\EntityTest\EntityTestDatetimeTest::getExpectedNormalizedEntity()

Overrides EntityTestResourceTestBase::getExpectedNormalizedEntity

File

core/modules/datetime/tests/src/Functional/EntityResource/EntityTest/EntityTestDatetimeTest.php, line 96

Class

EntityTestDatetimeTest
Tests the datetime field constraint with 'datetime' items.

Namespace

Drupal\Tests\datetime\Functional\EntityResource\EntityTest

Code

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

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