public function ContentEntitySourceContentModerationTest::setUp

Same name in this branch
  1. 8.x-1.x sources/content/tests/src/Functional/ContentEntitySourceContentModerationTest.php \Drupal\Tests\tmgmt_content\Functional\ContentEntitySourceContentModerationTest::setUp()
  2. 8.x-1.x sources/content/tests/src/Kernel/ContentEntitySourceContentModerationTest.php \Drupal\Tests\tmgmt_content\Kernel\ContentEntitySourceContentModerationTest::setUp()

Overrides ContentEntityTestBase::setUp

File

sources/content/tests/src/Kernel/ContentEntitySourceContentModerationTest.php, line 42

Class

ContentEntitySourceContentModerationTest
Content entity Source unit tests.

Namespace

Drupal\Tests\tmgmt_content\Kernel

Code

public function setUp() : void {
  parent::setUp();
  $this
    ->installEntitySchema('content_moderation_state');
  $this
    ->installEntitySchema('user');
  $this
    ->installConfig([
    'content_moderation',
    'filter',
  ]);
  $this
    ->installEntitySchema('entity_test_mulrev');
  ConfigurableLanguage::createFromLangcode('es')
    ->save();
  $this->workflow = $this
    ->createEditorialWorkflow();
  $this->workflow
    ->getTypePlugin()
    ->addEntityTypeAndBundle($this->entityTypeId, $this->entityTypeId);
  $this->workflow
    ->save();
  $this->container
    ->get('content_translation.manager')
    ->setEnabled($this->entityTypeId, $this->entityTypeId, TRUE);
}