You are here

protected function PBTKernelTestBase::setUp in Permissions by Term 8

Same name and namespace in other branches
  1. 8.2 tests/src/Kernel/PBTKernelTestBase.php \Drupal\Tests\permissions_by_term\Kernel\PBTKernelTestBase::setUp()

Overrides KernelTestBase::setUp

4 calls to PBTKernelTestBase::setUp()
AccessCheckTest::setUp in tests/src/Kernel/AccessCheckTest.php
AccessStorageTest::setUp in tests/src/Kernel/AccessStorageTest.php
MultilingualTest::setUp in tests/src/Kernel/MultilingualTest.php
NodeEntityBundleInfoTest::setUp in tests/src/Kernel/NodeEntityBundleInfoTest.php
4 methods override PBTKernelTestBase::setUp()
AccessCheckTest::setUp in tests/src/Kernel/AccessCheckTest.php
AccessStorageTest::setUp in tests/src/Kernel/AccessStorageTest.php
MultilingualTest::setUp in tests/src/Kernel/MultilingualTest.php
NodeEntityBundleInfoTest::setUp in tests/src/Kernel/NodeEntityBundleInfoTest.php

File

tests/src/Kernel/PBTKernelTestBase.php, line 62

Class

PBTKernelTestBase
Class PBTKernelTestBase

Namespace

Drupal\Tests\permissions_by_term\Kernel

Code

protected function setUp() {
  parent::setUp();
  $this
    ->installEntitySchema('user');
  $this
    ->installSchema('system', [
    'key_value_expire',
    'sequences',
  ]);
  $this
    ->installEntitySchema('node');
  $this
    ->installEntitySchema('taxonomy_term');
  $this
    ->installConfig([
    'permissions_by_term',
  ]);
  $this
    ->installConfig([
    'language',
  ]);
  $this
    ->installSchema('node', 'node_access');
  $this
    ->installSchema('permissions_by_term', 'permissions_by_term_user');
  $this
    ->installSchema('permissions_by_term', 'permissions_by_term_role');
  $this->accessStorage = $this->container
    ->get('permissions_by_term.access_storage');
  $this->accessCheck = $this->container
    ->get('permissions_by_term.access_check');
  \Drupal::configFactory()
    ->getEditable('taxonomy.settings')
    ->set('maintain_index_table', TRUE)
    ->save();
  $this
    ->createTestVocabularies();
  $this
    ->createPageNodeType();
  $this
    ->createCurrentUser();
}