You are here

protected function EntityTestTextItemNormalizerTest::getNormalizedPostEntity in Drupal 9

Same name and namespace in other branches
  1. 8 core/modules/system/tests/modules/entity_test/tests/src/Functional/Rest/EntityTestTextItemNormalizerTest.php \Drupal\Tests\entity_test\Functional\Rest\EntityTestTextItemNormalizerTest::getNormalizedPostEntity()
  2. 10 core/modules/system/tests/modules/entity_test/tests/src/Functional/Rest/EntityTestTextItemNormalizerTest.php \Drupal\Tests\entity_test\Functional\Rest\EntityTestTextItemNormalizerTest::getNormalizedPostEntity()

Returns the normalized POST entity.

Return value

array

Overrides EntityTestResourceTestBase::getNormalizedPostEntity

See also

::testPost

File

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

Class

EntityTestTextItemNormalizerTest
@group rest

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;
}