You are here

protected function EntityQueryAlterComplexTest::createNode in Group 8

Same name and namespace in other branches
  1. 2.0.x tests/src/Kernel/EntityQueryAlterComplexTest.php \Drupal\Tests\group\Kernel\EntityQueryAlterComplexTest::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.

17 calls to EntityQueryAlterComplexTest::createNode()
EntityQueryAlterComplexTest::testMemberAdminAccess in tests/src/Kernel/EntityQueryAlterComplexTest.php
Tests the admin access for members.
EntityQueryAlterComplexTest::testMemberGroupAccessWithoutPermission in tests/src/Kernel/EntityQueryAlterComplexTest.php
Tests that grouped nodes are properly hidden for members.
EntityQueryAlterComplexTest::testMemberGroupAccessWithPermission in tests/src/Kernel/EntityQueryAlterComplexTest.php
Tests that grouped nodes are visible to members.
EntityQueryAlterComplexTest::testMemberViewAnyPublishedAccess in tests/src/Kernel/EntityQueryAlterComplexTest.php
Tests the viewing of any published entities for members.
EntityQueryAlterComplexTest::testMemberViewAnyUnpublishedAccess in tests/src/Kernel/EntityQueryAlterComplexTest.php
Tests the viewing of any unpublished entities for members.

... See full list

File

tests/src/Kernel/EntityQueryAlterComplexTest.php, line 543

Class

EntityQueryAlterComplexTest
Tests that Group properly checks access for "complex" grouped entities.

Namespace

Drupal\Tests\group\Kernel

Code

protected function createNode(array $values = []) {
  $node = $this->storage
    ->create($values + [
    'title' => $this
      ->randomString(),
  ]);
  $node
    ->enforceIsNew();
  $this->storage
    ->save($node);
  return $node;
}