You are here

protected function ContentModerationStateTest::setUp in Drupal 9

Same name and namespace in other branches
  1. 8 core/modules/content_moderation/tests/src/Kernel/ContentModerationStateTest.php \Drupal\Tests\content_moderation\Kernel\ContentModerationStateTest::setUp()

Overrides KernelTestBase::setUp

1 call to ContentModerationStateTest::setUp()
WorkspacesContentModerationStateTest::setUp in core/modules/content_moderation/tests/src/Kernel/WorkspacesContentModerationStateTest.php
1 method overrides ContentModerationStateTest::setUp()
WorkspacesContentModerationStateTest::setUp in core/modules/content_moderation/tests/src/Kernel/WorkspacesContentModerationStateTest.php

File

core/modules/content_moderation/tests/src/Kernel/ContentModerationStateTest.php, line 69

Class

ContentModerationStateTest
Tests links between a content entity and a content_moderation_state entity.

Namespace

Drupal\Tests\content_moderation\Kernel

Code

protected function setUp() : void {
  parent::setUp();
  $this
    ->installSchema('node', 'node_access');
  $this
    ->installEntitySchema('node');
  $this
    ->installEntitySchema('user');
  $this
    ->installEntitySchema($this->revEntityTypeId);
  $this
    ->installEntitySchema('entity_test_no_bundle');
  $this
    ->installEntitySchema('entity_test_mulrevpub');
  $this
    ->installEntitySchema('block_content');
  $this
    ->installEntitySchema('media');
  $this
    ->installEntitySchema('file');
  $this
    ->installEntitySchema('content_moderation_state');
  $this
    ->installConfig('content_moderation');
  $this
    ->installSchema('file', 'file_usage');
  $this
    ->installConfig([
    'field',
    'file',
    'filter',
    'image',
    'media',
    'node',
    'system',
  ]);

  // Add the French language.
  ConfigurableLanguage::createFromLangcode('fr')
    ->save();
  $this->entityTypeManager = $this->container
    ->get('entity_type.manager');
}