You are here

protected function ParagraphsTest::setUp in Multiversion 8

Overrides KernelTestBase::setUp

File

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

Class

ParagraphsTest
Test for paragraphs integration.

Namespace

Drupal\Tests\multiversion\Kernel

Code

protected function setUp() {
  parent::setUp();
  $this
    ->installEntitySchema('file');
  $this
    ->installEntitySchema('node');
  $this
    ->installEntitySchema('paragraph');
  $this
    ->installEntitySchema('user');
  $this
    ->installEntitySchema('workspace');
  $this
    ->installConfig([
    'multiversion',
    'multiversion_test_paragraphs',
  ]);
  $this
    ->installSchema('node', 'node_access');
  $this
    ->installSchema('key_value', 'key_value_sorted');
  $this
    ->installSchema('file', 'file_usage');
  $multiversion_manager = $this->container
    ->get('multiversion.manager');
  $multiversion_manager
    ->enableEntityTypes();
  $workspace = Workspace::create([
    'machine_name' => 'live',
    'label' => 'Live',
    'type' => 'basic',
  ]);
  $workspace
    ->save();
  $this->nodeStorage = $this->container
    ->get('entity_type.manager')
    ->getStorage('node');
  $this->paragraphStorage = $this->container
    ->get('entity_type.manager')
    ->getStorage('paragraph');
}