protected function GroupContentCreateAccessTest::createNodeType in Group 2.0.x
Same name and namespace in other branches
- 8 tests/src/Kernel/GroupContentCreateAccessTest.php \Drupal\Tests\group\Kernel\GroupContentCreateAccessTest::createNodeType()
Creates a node type.
Parameters
array $values: (optional) The values used to create the entity.
Return value
\Drupal\node\Entity\NodeType The created node type entity.
1 call to GroupContentCreateAccessTest::createNodeType()
- GroupContentCreateAccessTest::setUp in tests/
src/ Kernel/ GroupContentCreateAccessTest.php
File
- tests/
src/ Kernel/ GroupContentCreateAccessTest.php, line 327
Class
- GroupContentCreateAccessTest
- Tests the group content create access for groups.
Namespace
Drupal\Tests\group\KernelCode
protected function createNodeType(array $values = []) {
$storage = $this->entityTypeManager
->getStorage('node_type');
$node_type = $storage
->create($values + [
'type' => $this
->randomMachineName(),
'label' => $this
->randomString(),
]);
$storage
->save($node_type);
return $node_type;
}