You are here

protected function FileResourceTestBase::getNormalizedPatchEntity in Drupal 9

Same name and namespace in other branches
  1. 8 core/modules/file/tests/src/Functional/Rest/FileResourceTestBase.php \Drupal\Tests\file\Functional\Rest\FileResourceTestBase::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/file/tests/src/Functional/Rest/FileResourceTestBase.php, line 181

Class

FileResourceTestBase

Namespace

Drupal\Tests\file\Functional\Rest

Code

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