You are here

protected function MediaResourceTestBase::getNormalizedPostEntity in Drupal 8

Same name and namespace in other branches
  1. 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

2 calls to MediaResourceTestBase::getNormalizedPostEntity()
MediaHalJsonAnonTest::getNormalizedPostEntity in core/modules/media/tests/src/Functional/Hal/MediaHalJsonAnonTest.php
Returns the normalized POST entity.
MediaResourceTestBase::getNormalizedPatchEntity in core/modules/media/tests/src/Functional/Rest/MediaResourceTestBase.php
Returns the normalized PATCH entity.
1 method overrides MediaResourceTestBase::getNormalizedPostEntity()
MediaHalJsonAnonTest::getNormalizedPostEntity in core/modules/media/tests/src/Functional/Hal/MediaHalJsonAnonTest.php
Returns the normalized POST entity.

File

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

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