You are here

protected function FlushTest::setUp in Workbench Access 8

Overrides KernelTestBase::setUp

File

tests/src/Kernel/FlushTest.php, line 56

Class

FlushTest
Defines a class for testing that deleting schemes flushes privileges.

Namespace

Drupal\Tests\workbench_access\Kernel

Code

protected function setUp() {
  parent::setUp();
  $this
    ->installEntitySchema('node');
  $this
    ->installConfig([
    'filter',
    'node',
    'workbench_access',
  ]);
  $this
    ->installEntitySchema('user');
  $this
    ->installEntitySchema('taxonomy_term');
  $this
    ->installEntitySchema('section_association');
  $this
    ->installSchema('system', [
    'key_value',
    'sequences',
  ]);
  $node_type = $this
    ->createContentType([
    'type' => 'page',
  ]);
  $this
    ->createContentType([
    'type' => 'article',
  ]);
  $this->vocabulary = $this
    ->setUpVocabulary();
  $this
    ->setUpTaxonomyFieldForEntityType('node', $node_type
    ->id(), $this->vocabulary
    ->id());
  $this->scheme = $this
    ->setUpTaxonomyScheme($node_type, $this->vocabulary);
}