You are here

protected function MediaResourceTestBase::getNormalizedPatchEntity 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::getNormalizedPatchEntity()

Returns the normalized PATCH entity.

By default, reuses ::getNormalizedPostEntity(), which works fine for most entity types. A counterexample: the 'comment' entity type.

Return value

array

Overrides EntityResourceTestBase::getNormalizedPatchEntity

See also

::testPatch

File

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

Class

MediaResourceTestBase

Namespace

Drupal\Tests\media\Functional\Rest

Code

protected function getNormalizedPatchEntity() {
  return array_diff_key($this
    ->getNormalizedPostEntity(), [
    'field_media_file' => TRUE,
  ]);
}