You are here

protected function WorkspaceResourceTestBase::getSecondNormalizedPostEntity in Drupal 8

Gets the second normalized POST entity.

Entity types can have non-sequential IDs, and in that case the second entity created for POST testing needs to be able to specify a different ID.

Return value

array An array structure as returned by ::getNormalizedPostEntity().

Overrides EntityResourceTestBase::getSecondNormalizedPostEntity

See also

::testPost

::getNormalizedPostEntity

File

core/modules/workspaces/tests/src/Functional/EntityResource/WorkspaceResourceTestBase.php, line 155

Class

WorkspaceResourceTestBase
Base class for workspace EntityResource tests.

Namespace

Drupal\Tests\workspaces\Functional\EntityResource

Code

protected function getSecondNormalizedPostEntity() {
  $normalized_post_entity = $this
    ->getNormalizedPostEntity();
  $normalized_post_entity['id'][0]['value'] = static::$secondCreatedEntityId;
  return $normalized_post_entity;
}