protected function GroupToGroupContentRelationshipTest::createUser in Group 8
Same name and namespace in other branches
- 2.0.x tests/src/Kernel/Views/GroupToGroupContentRelationshipTest.php \Drupal\Tests\group\Kernel\Views\GroupToGroupContentRelationshipTest::createUser()
Creates a user.
Parameters
array $values: (optional) The values used to create the entity.
Return value
\Drupal\user\Entity\User The created user entity.
3 calls to GroupToGroupContentRelationshipTest::createUser()
- GroupToGroupContentRelationshipTest::setUp in tests/
src/ Kernel/ Views/ GroupToGroupContentRelationshipTest.php - GroupToGroupContentRelationshipTest::testAddedMemberIsListed in tests/
src/ Kernel/ Views/ GroupToGroupContentRelationshipTest.php - Tests that an extra group member is returned by the view.
- GroupToGroupContentRelationshipTest::testOtherContentIsNotListed in tests/
src/ Kernel/ Views/ GroupToGroupContentRelationshipTest.php - Tests that any other group content is not returned by the view.
File
- tests/
src/ Kernel/ Views/ GroupToGroupContentRelationshipTest.php, line 117
Class
- GroupToGroupContentRelationshipTest
- Tests the group_to_group_content relationship handler.
Namespace
Drupal\Tests\group\Kernel\ViewsCode
protected function createUser($values = []) {
$account = $this->entityTypeManager
->getStorage('user')
->create($values + [
'name' => $this
->randomMachineName(),
'status' => 1,
]);
$account
->enforceIsNew();
$account
->save();
return $account;
}