protected function GroupContentStorageTest::createUnsavedGroup in Group 2.0.x
Same name and namespace in other branches
- 8 tests/src/Kernel/GroupContentStorageTest.php \Drupal\Tests\group\Kernel\GroupContentStorageTest::createUnsavedGroup()
Creates an unsaved group.
Parameters
array $values: (optional) The values used to create the entity.
Return value
\Drupal\group\Entity\Group The created group entity.
3 calls to GroupContentStorageTest::createUnsavedGroup()
- GroupContentStorageTest::testCreateForUnsavedGroup in tests/
src/ Kernel/ GroupContentStorageTest.php - Tests the creation of a GroupContent entity using an unsaved group.
- GroupContentStorageTest::testLoadByUnsavedEntity in tests/
src/ Kernel/ GroupContentStorageTest.php - Tests the loading of GroupContent entities for an unsaved entity.
- GroupContentStorageTest::testLoadByUnsavedGroup in tests/
src/ Kernel/ GroupContentStorageTest.php - Tests the loading of GroupContent entities for an unsaved group.
File
- tests/
src/ Kernel/ GroupContentStorageTest.php, line 52
Class
- GroupContentStorageTest
- Tests the behavior of group content storage handler.
Namespace
Drupal\Tests\group\KernelCode
protected function createUnsavedGroup($values = []) {
$group = $this->entityTypeManager
->getStorage('group')
->create($values + [
'type' => 'default',
'label' => $this
->randomMachineName(),
]);
return $group;
}