You are here

protected function UserTest::getModifiedEntityForPostTesting in Drupal 8

Same name and namespace in other branches
  1. 9 core/modules/jsonapi/tests/src/Functional/UserTest.php \Drupal\Tests\jsonapi\Functional\UserTest::getModifiedEntityForPostTesting()

Gets the normalized POST entity with random values for its unique fields.

Return value

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

Overrides ResourceTestBase::getModifiedEntityForPostTesting

See also

::testPostIndividual

::getPostDocument

File

core/modules/jsonapi/tests/src/Functional/UserTest.php, line 591

Class

UserTest
JSON:API integration test for the "User" content entity type.

Namespace

Drupal\Tests\jsonapi\Functional

Code

protected function getModifiedEntityForPostTesting() {
  $modified = parent::getModifiedEntityForPostTesting();
  $modified['data']['attributes']['name'] = $this
    ->randomMachineName();
  return $modified;
}