function 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
File
- 
              core/
modules/ jsonapi/ tests/ src/ Functional/ UserTest.php, line 804  
Class
- UserTest
 - JSON:API integration test for the "User" content entity type.
 
Namespace
Drupal\Tests\jsonapi\FunctionalCode
protected function getModifiedEntityForPostTesting() {
  $modified = parent::getModifiedEntityForPostTesting();
  $modified['data']['attributes']['name'] = $this->randomMachineName();
  return $modified;
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.