function EntityTestTextItemNormalizerTest::getExpectedNormalizedEntity

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

Overrides EntityTestResourceTestBase::getExpectedNormalizedEntity

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

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