You are here

protected function ModerationInformationTest::setUp in Drupal 10

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

File

core/modules/content_moderation/tests/src/Kernel/ModerationInformationTest.php, line 41

Class

ModerationInformationTest
@coversDefaultClass \Drupal\content_moderation\ModerationInformation @group content_moderation

Namespace

Drupal\Tests\content_moderation\Kernel

Code

protected function setUp() : void {
  parent::setUp();
  $this
    ->installEntitySchema('entity_test_rev');
  $this
    ->installEntitySchema('entity_test_mulrevpub');
  $this
    ->installEntitySchema('content_moderation_state');
  $this
    ->installConfig([
    'content_moderation',
  ]);
  $this->moderationInformation = $this->container
    ->get('content_moderation.moderation_information');
  ConfigurableLanguage::createFromLangcode('de')
    ->save();
  $workflow = $this
    ->createEditorialWorkflow();
  $workflow
    ->getTypePlugin()
    ->addEntityTypeAndBundle('entity_test_mulrevpub', 'entity_test_mulrevpub');
  $workflow
    ->getTypePlugin()
    ->addEntityTypeAndBundle('entity_test_rev', 'entity_test_rev');
  $workflow
    ->save();
  $this->container
    ->get('content_translation.manager')
    ->setEnabled('entity_test_mulrevpub', 'entity_test_mulrevpub', TRUE);
}