protected function EntityAccessComplexTest::createNode in Group 2.0.x
Same name and namespace in other branches
- 8 tests/src/Kernel/EntityAccessComplexTest.php \Drupal\Tests\group\Kernel\EntityAccessComplexTest::createNode()
Creates a node.
Parameters
array $values: (optional) The values used to create the entity.
Return value
\Drupal\node\Entity\Node The created node entity.
23 calls to EntityAccessComplexTest::createNode()
- EntityAccessComplexTest::testAnonymousViewAnyPublishedAccess in tests/
src/ Kernel/ EntityAccessComplexTest.php - Tests the viewing of any published grouped entities for anonymous.
- EntityAccessComplexTest::testAnonymousViewAnyUnpublishedAccess in tests/
src/ Kernel/ EntityAccessComplexTest.php - Tests the viewing of any unpublished grouped entities for anonymous.
- EntityAccessComplexTest::testMemberDeleteAnyAccess in tests/
src/ Kernel/ EntityAccessComplexTest.php - Tests the deleting of any grouped entities for members.
- EntityAccessComplexTest::testMemberDeleteOwnAccess in tests/
src/ Kernel/ EntityAccessComplexTest.php - Tests the deleting of own grouped entities for members.
- EntityAccessComplexTest::testMemberGroupAccessWithoutPermission in tests/
src/ Kernel/ EntityAccessComplexTest.php - Tests that grouped nodes are properly hidden.
File
- tests/
src/ Kernel/ EntityAccessComplexTest.php, line 962
Class
- EntityAccessComplexTest
- Tests that Group properly checks access for "complex" grouped entities.
Namespace
Drupal\Tests\group\KernelCode
protected function createNode(array $values = []) {
$node = $this->storage
->create($values + [
'title' => $this
->randomString(),
]);
$node
->enforceIsNew();
$this->storage
->save($node);
return $node;
}