function TermResourceTestBase::getNormalizedPostEntity

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

Returns the normalized POST entity.

Return value

array

Overrides EntityResourceTestBase::getNormalizedPostEntity

File

core/modules/taxonomy/tests/src/Functional/Rest/TermResourceTestBase.php, line 247

Class

TermResourceTestBase

Namespace

Drupal\Tests\taxonomy\Functional\Rest

Code

protected function getNormalizedPostEntity() {
  return [
    'vid' => [
      [
        'target_id' => 'camelids',
      ],
    ],
    'name' => [
      [
        'value' => 'Drama llama',
      ],
    ],
    'description' => [
      [
        'value' => 'Drama llamas are the coolest camelids.',
        'format' => NULL,
      ],
    ],
  ];
}

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