You are here

protected function MediaResourceTestBase::getNormalizedPostEntity in Drupal 10

Same name and namespace in other branches
  1. 8 core/modules/media/tests/src/Functional/Rest/MediaResourceTestBase.php \Drupal\Tests\media\Functional\Rest\MediaResourceTestBase::getNormalizedPostEntity()
  2. 9 core/modules/media/tests/src/Functional/Rest/MediaResourceTestBase.php \Drupal\Tests\media\Functional\Rest\MediaResourceTestBase::getNormalizedPostEntity()

Returns the normalized POST entity.

Return value

array

Overrides EntityResourceTestBase::getNormalizedPostEntity

See also

::testPost

1 call to MediaResourceTestBase::getNormalizedPostEntity()
MediaResourceTestBase::getNormalizedPatchEntity in core/modules/media/tests/src/Functional/Rest/MediaResourceTestBase.php
Returns the normalized PATCH entity.

File

core/modules/media/tests/src/Functional/Rest/MediaResourceTestBase.php, line 260

Class

MediaResourceTestBase

Namespace

Drupal\Tests\media\Functional\Rest

Code

protected function getNormalizedPostEntity() {
  return [
    'bundle' => [
      [
        'target_id' => 'camelids',
      ],
    ],
    'name' => [
      [
        'value' => 'Dramallama',
      ],
    ],
    'field_media_file' => [
      [
        'description' => NULL,
        'display' => NULL,
        'target_id' => 3,
      ],
    ],
  ];
}