function MediaResourceTestBase::getNormalizedPostEntity

Same name in other branches
  1. 9 core/modules/media/tests/src/Functional/Rest/MediaResourceTestBase.php \Drupal\Tests\media\Functional\Rest\MediaResourceTestBase::getNormalizedPostEntity()
  2. 8.9.x core/modules/media/tests/src/Functional/Rest/MediaResourceTestBase.php \Drupal\Tests\media\Functional\Rest\MediaResourceTestBase::getNormalizedPostEntity()
  3. 10 core/modules/media/tests/src/Functional/Rest/MediaResourceTestBase.php \Drupal\Tests\media\Functional\Rest\MediaResourceTestBase::getNormalizedPostEntity()

Overrides EntityResourceTestBase::getNormalizedPostEntity

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 261

Class

MediaResourceTestBase

Namespace

Drupal\Tests\media\Functional\Rest

Code

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

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