protected function GroupContentStorageTest::createUnsavedUser in Group 2.0.x
Same name and namespace in other branches
- 8 tests/src/Kernel/GroupContentStorageTest.php \Drupal\Tests\group\Kernel\GroupContentStorageTest::createUnsavedUser()
Creates an unsaved user.
Parameters
array $values: (optional) The values used to create the entity.
Return value
\Drupal\user\Entity\User The created user entity.
1 call to GroupContentStorageTest::createUnsavedUser()
- GroupContentStorageTest::testCreateForUnsavedEntity in tests/
src/ Kernel/ GroupContentStorageTest.php - Tests the creation of a GroupContent entity using an unsaved entity.
File
- tests/
src/ Kernel/ GroupContentStorageTest.php, line 69
Class
- GroupContentStorageTest
- Tests the behavior of group content storage handler.
Namespace
Drupal\Tests\group\KernelCode
protected function createUnsavedUser($values = []) {
$account = $this->entityTypeManager
->getStorage('user')
->create($values + [
'name' => $this
->randomMachineName(),
'status' => 1,
]);
return $account;
}