You are here

protected function TermResourceTestBase::getNormalizedPostEntity in Drupal 8

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. 10 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

See also

::testPost

1 call to TermResourceTestBase::getNormalizedPostEntity()
TermHalJsonAnonTest::getNormalizedPostEntity in core/modules/taxonomy/tests/src/Functional/Hal/TermHalJsonAnonTest.php
Returns the normalized POST entity.
1 method overrides TermResourceTestBase::getNormalizedPostEntity()
TermHalJsonAnonTest::getNormalizedPostEntity in core/modules/taxonomy/tests/src/Functional/Hal/TermHalJsonAnonTest.php
Returns the normalized POST entity.

File

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

Class

TermResourceTestBase

Namespace

Drupal\Tests\taxonomy\Functional\Rest

Code

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