You are here

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

Class

MediaResourceTestBase

Namespace

Drupal\Tests\media\Functional\Rest

Code

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