protected function GroupKernelTestBase::createGroupType in Group 2.0.x
Same name and namespace in other branches
- 8 tests/src/Kernel/GroupKernelTestBase.php \Drupal\Tests\group\Kernel\GroupKernelTestBase::createGroupType()
Creates a group type.
Parameters
array $values: (optional) The values used to create the entity.
Return value
\Drupal\group\Entity\GroupType The created group type entity.
15 calls to GroupKernelTestBase::createGroupType()
- ChainGroupPermissionCalculatorTest::testCalculateAnonymousPermissions in tests/
src/ Kernel/ ChainGroupPermissionCalculatorTest.php - Tests the calculation of the anonymous permissions.
- ChainGroupPermissionCalculatorTest::testCalculateOutsiderPermissions in tests/
src/ Kernel/ ChainGroupPermissionCalculatorTest.php - Tests the calculation of the outsider permissions.
- EntityAccessComplexTest::setUp in tests/
src/ Kernel/ EntityAccessComplexTest.php - EntityAccessTest::setUp in tests/
src/ Kernel/ EntityAccessTest.php - EntityQueryAlterCacheabilityTest::setUp in tests/
src/ Kernel/ EntityQueryAlterCacheabilityTest.php
File
- tests/
src/ Kernel/ GroupKernelTestBase.php, line 84
Class
- GroupKernelTestBase
- Defines an abstract test base for group kernel tests.
Namespace
Drupal\Tests\group\KernelCode
protected function createGroupType(array $values = []) {
$storage = $this->entityTypeManager
->getStorage('group_type');
$group_type = $storage
->create($values + [
'id' => $this
->randomMachineName(),
'label' => $this
->randomString(),
]);
$storage
->save($group_type);
return $group_type;
}