You are here

protected function InlineEntityFormTest::setUp in Workbench Access 8

Sets up the tZest.

Overrides KernelTestBase::setUp

File

tests/src/Kernel/InlineEntityFormTest.php, line 66

Class

InlineEntityFormTest
Tests workbench access with inline entity form.

Namespace

Drupal\Tests\workbench_access\Kernel

Code

protected function setUp() {
  parent::setUp();
  $this
    ->installEntitySchema('node');
  $this
    ->installConfig([
    'filter',
    'node',
    'workbench_access',
    'system',
  ]);
  $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->accessHandler = $this->container
    ->get('entity_type.manager')
    ->getAccessControlHandler('node');
  $this
    ->setUpTaxonomyFieldForEntityType('node', $node_type
    ->id(), $this->vocabulary
    ->id());
  $this->scheme = $this
    ->setUpTaxonomyScheme($node_type, $this->vocabulary);
}