You are here

public function EntityQueryAlterComplexTest::testRegularAccess in Group 8

Same name and namespace in other branches
  1. 2.0.x tests/src/Kernel/EntityQueryAlterComplexTest.php \Drupal\Tests\group\Kernel\EntityQueryAlterComplexTest::testRegularAccess()

Tests that regular access checks still work.

File

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

Class

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

Namespace

Drupal\Tests\group\Kernel

Code

public function testRegularAccess() {
  $node_1 = $this
    ->createNode([
    'type' => 'page',
    'uid' => $this
      ->createUser()
      ->id(),
  ]);
  $node_2 = $this
    ->createNode([
    'type' => 'page',
  ]);
  $this
    ->assertQueryAccessResult([
    $node_1
      ->id(),
    $node_2
      ->id(),
  ], 'Regular node query access still works.');
}