function EntityResourceTestBase::getNormalizedPatchEntity

Same name and namespace in other branches
  1. 8.9.x core/modules/rest/tests/src/Functional/EntityResource/EntityResourceTestBase.php \Drupal\Tests\rest\Functional\EntityResource\EntityResourceTestBase::getNormalizedPatchEntity()
  2. 10 core/modules/rest/tests/src/Functional/EntityResource/EntityResourceTestBase.php \Drupal\Tests\rest\Functional\EntityResource\EntityResourceTestBase::getNormalizedPatchEntity()
  3. 11.x core/modules/rest/tests/src/Functional/EntityResource/EntityResourceTestBase.php \Drupal\Tests\rest\Functional\EntityResource\EntityResourceTestBase::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

See also

::testPatch

1 call to EntityResourceTestBase::getNormalizedPatchEntity()
EntityResourceTestBase::testPatch in core/modules/rest/tests/src/Functional/EntityResource/EntityResourceTestBase.php
Tests a PATCH request for an entity, plus edge cases to ensure good DX.
4 methods override EntityResourceTestBase::getNormalizedPatchEntity()
CommentResourceTestBase::getNormalizedPatchEntity in core/modules/comment/tests/src/Functional/Rest/CommentResourceTestBase.php
Returns the normalized PATCH entity.
FileResourceTestBase::getNormalizedPatchEntity in core/modules/file/tests/src/Functional/Rest/FileResourceTestBase.php
Returns the normalized PATCH entity.
MediaResourceTestBase::getNormalizedPatchEntity in core/modules/media/tests/src/Functional/Rest/MediaResourceTestBase.php
Returns the normalized PATCH entity.
WorkspaceResourceTestBase::getNormalizedPatchEntity in core/modules/workspaces/tests/src/Functional/EntityResource/WorkspaceResourceTestBase.php
Returns the normalized PATCH entity.

File

core/modules/rest/tests/src/Functional/EntityResource/EntityResourceTestBase.php, line 296

Class

EntityResourceTestBase
Defines a base class for testing all entity resources.

Namespace

Drupal\Tests\rest\Functional\EntityResource

Code

protected function getNormalizedPatchEntity() {
    return $this->getNormalizedPostEntity();
}

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