You are here

protected function EntityReferenceDependencyManagerTest::setUp in Entity Reference Integrity 8

Overrides KernelTestBase::setUp

File

tests/src/Kernel/EntityReferenceDependencyManagerTest.php, line 54

Class

EntityReferenceDependencyManagerTest
Test the EntityReferenceDependencyManager.

Namespace

Drupal\Tests\entity_reference_integrity\Kernel

Code

protected function setUp() {
  parent::setUp();
  $this
    ->installEntitySchema('node');
  $this
    ->installEntitySchema('user');
  $this
    ->installSchema('system', 'sequences');
  $this
    ->installSchema('node', 'node_access');
  $this->dependencyManager = $this->container
    ->get('entity_reference_integrity.dependency_manager');
  $this->testUser = User::create([
    'name' => 'Gerald',
  ]);
  $this->testUser
    ->save();
  $this->testNode = Node::create([
    'title' => 'foo',
    'type' => 'bar',
  ]);
  $this->testNode
    ->save();
}