You are here

private function EntityAccessCheckTest::createNodesForEachUser in Permissions by Term 8

Same name and namespace in other branches
  1. 8.2 modules/permissions_by_entity/tests/src/Kernel/EntityAccessCheckTest.php \Drupal\Tests\permissions_by_entity\Kernel\EntityAccessCheckTest::createNodesForEachUser()

Creates nods for each user.

See also

setupUsersAndTerms()

1 call to EntityAccessCheckTest::createNodesForEachUser()
EntityAccessCheckTest::setUp in modules/permissions_by_entity/tests/src/Kernel/EntityAccessCheckTest.php

File

modules/permissions_by_entity/tests/src/Kernel/EntityAccessCheckTest.php, line 146

Class

EntityAccessCheckTest
Class EntityAccessCheckTest

Namespace

Drupal\Tests\permissions_by_entity\Kernel

Code

private function createNodesForEachUser() {
  $nodes['test_entity_term_a'] = TestEntity::create([
    'terms' => [
      $this->terms['term_user_a']['term']
        ->id(),
    ],
    'langcode' => 'en',
  ]);
  $nodes['test_entity_term_a']
    ->save();
  $nodes['test_entity_term_b'] = TestEntity::create([
    'terms' => [
      $this->terms['term_user_b']['term']
        ->id(),
    ],
    'langcode' => 'en',
  ]);
  $nodes['test_entity_term_b']
    ->save();
  $this->nodes = $nodes;
}