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. 10 core/modules/media/tests/src/Functional/Rest/MediaResourceTestBase.php \Drupal\Tests\media\Functional\Rest\MediaResourceTestBase::getNormalizedPostEntity()
  3. 11.x core/modules/media/tests/src/Functional/Rest/MediaResourceTestBase.php \Drupal\Tests\media\Functional\Rest\MediaResourceTestBase::getNormalizedPostEntity()

Overrides EntityResourceTestBase::getNormalizedPostEntity

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

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