function EntityTestTextItemNormalizerTest::getNormalizedPostEntity

Same name in other branches
  1. 9 core/modules/system/tests/modules/entity_test/tests/src/Functional/Rest/EntityTestTextItemNormalizerTest.php \Drupal\Tests\entity_test\Functional\Rest\EntityTestTextItemNormalizerTest::getNormalizedPostEntity()
  2. 8.9.x core/modules/system/tests/modules/entity_test/tests/src/Functional/Rest/EntityTestTextItemNormalizerTest.php \Drupal\Tests\entity_test\Functional\Rest\EntityTestTextItemNormalizerTest::getNormalizedPostEntity()
  3. 11.x core/modules/system/tests/modules/entity_test/tests/src/Functional/Rest/EntityTestTextItemNormalizerTest.php \Drupal\Tests\entity_test\Functional\Rest\EntityTestTextItemNormalizerTest::getNormalizedPostEntity()

Overrides EntityTestResourceTestBase::getNormalizedPostEntity

File

core/modules/system/tests/modules/entity_test/tests/src/Functional/Rest/EntityTestTextItemNormalizerTest.php, line 114

Class

EntityTestTextItemNormalizerTest
@group rest @group #slow

Namespace

Drupal\Tests\entity_test\Functional\Rest

Code

protected function getNormalizedPostEntity() {
    $post_entity = parent::getNormalizedPostEntity();
    $post_entity['field_test_text'] = [
        [
            'value' => 'Llamas are awesome.',
            'format' => 'my_text_format',
        ],
    ];
    return $post_entity;
}

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