You are here

protected function EntityTestTextItemNormalizerTest::getExpectedNormalizedEntity 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::getExpectedNormalizedEntity()
  2. 10 core/modules/system/tests/modules/entity_test/tests/src/Functional/Rest/EntityTestTextItemNormalizerTest.php \Drupal\Tests\entity_test\Functional\Rest\EntityTestTextItemNormalizerTest::getExpectedNormalizedEntity()

Returns the expected normalization of the entity.

Return value

array

Overrides EntityTestResourceTestBase::getExpectedNormalizedEntity

See also

::createEntity()

File

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

Class

EntityTestTextItemNormalizerTest
@group rest

Namespace

Drupal\Tests\entity_test\Functional\Rest

Code

protected function getExpectedNormalizedEntity() {
  $expected = parent::getExpectedNormalizedEntity();
  $expected['field_test_text'] = [
    [
      'value' => 'Cádiz is the oldest continuously inhabited city in Spain and a nice place to spend a Sunday with friends.',
      'format' => 'my_text_format',
      'processed' => '<p>Cádiz is the oldest continuously inhabited city in Spain and a nice place to spend a Sunday with friends.</p>' . "\n" . '<p>This is a dynamic llama.</p>',
    ],
  ];
  return $expected;
}