function ModerationStateWidgetTest::setUp
Same name in other branches
- 9 core/modules/content_moderation/tests/src/Kernel/ModerationStateWidgetTest.php \Drupal\Tests\content_moderation\Kernel\ModerationStateWidgetTest::setUp()
- 10 core/modules/content_moderation/tests/src/Kernel/ModerationStateWidgetTest.php \Drupal\Tests\content_moderation\Kernel\ModerationStateWidgetTest::setUp()
- 11.x core/modules/content_moderation/tests/src/Kernel/ModerationStateWidgetTest.php \Drupal\Tests\content_moderation\Kernel\ModerationStateWidgetTest::setUp()
Overrides KernelTestBase::setUp
File
-
core/
modules/ content_moderation/ tests/ src/ Kernel/ ModerationStateWidgetTest.php, line 37
Class
- ModerationStateWidgetTest
- @coversDefaultClass \Drupal\content_moderation\Plugin\Field\FieldWidget\ModerationStateWidget @group content_moderation
Namespace
Drupal\Tests\content_moderation\KernelCode
protected function setUp() {
parent::setUp();
$this->installEntitySchema('content_moderation_state');
$this->installEntitySchema('user');
$this->installConfig([
'content_moderation',
'system',
]);
NodeType::create([
'type' => 'moderated',
])->save();
NodeType::create([
'type' => 'unmoderated',
])->save();
$workflow = $this->createEditorialWorkflow();
$workflow->getTypePlugin()
->addEntityTypeAndBundle('node', 'moderated');
$workflow->save();
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.