You are here

protected function OgRoleCacheContextTest::setUp in Organic groups 8

Same name in this branch
  1. 8 tests/src/Unit/Cache/Context/OgRoleCacheContextTest.php \Drupal\Tests\og\Unit\Cache\Context\OgRoleCacheContextTest::setUp()
  2. 8 tests/src/Kernel/Cache/Context/OgRoleCacheContextTest.php \Drupal\Tests\og\Kernel\Cache\Context\OgRoleCacheContextTest::setUp()

Overrides KernelTestBase::setUp

File

tests/src/Kernel/Cache/Context/OgRoleCacheContextTest.php, line 82

Class

OgRoleCacheContextTest
Tests the OG role cache context.

Namespace

Drupal\Tests\og\Kernel\Cache\Context

Code

protected function setUp() : void {
  parent::setUp();

  // Add membership and config schema.
  $this
    ->installConfig([
    'og',
  ]);
  $this
    ->installEntitySchema('entity_test');
  $this
    ->installEntitySchema('node');
  $this
    ->installEntitySchema('og_membership');
  $this
    ->installEntitySchema('user');
  $this
    ->installSchema('system', [
    'sequences',
  ]);
  $this->database = $this->container
    ->get('database');
  $this->entityTypeManager = $this->container
    ->get('entity_type.manager');
  $this->groupTypeManager = $this->container
    ->get('og.group_type_manager');
  $this->membershipManager = $this->container
    ->get('og.membership_manager');
  $this->privateKey = $this->container
    ->get('private_key');
}