protected function ModerationInformationTest::setUp in Drupal 8
Same name and namespace in other branches
- 9 core/modules/content_moderation/tests/src/Kernel/ModerationInformationTest.php \Drupal\Tests\content_moderation\Kernel\ModerationInformationTest::setUp()
Overrides KernelTestBase::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\KernelCode
protected function setUp() {
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);
}