You are here

protected function DomainAccessEntityCrudTest::setUp in Domain Access 8

Overrides KernelTestBase::setUp

File

domain_access/tests/src/Kernel/DomainAccessEntityCrudTest.php, line 41

Class

DomainAccessEntityCrudTest
Tests creation of nodes and users before and after deleting required fields.

Namespace

Drupal\Tests\domain_access\Kernel

Code

protected function setUp() {
  parent::setup();
  $this->entityTypeManager = $this->container
    ->get('entity_type.manager');
  $this
    ->installSchema('system', [
    'sequences',
  ]);
  $this
    ->installEntitySchema('user');
  $this
    ->installSchema('user', [
    'users_data',
  ]);
  $this
    ->installEntitySchema('node');
  $this
    ->installEntitySchema('node_type');
  $this
    ->installSchema('node', [
    'node_access',
  ]);
  $this
    ->installConfig($this::$modules);
  $type = $this->entityTypeManager
    ->getStorage('node_type')
    ->create([
    'type' => 'page',
    'name' => 'page',
  ]);
  $type
    ->save();
  module_load_install('domain_access');
  domain_access_install();
}