function ContentModerationWorkflowConfigTest::setUp
Overrides KernelTestBase::setUp
File
- 
              core/modules/ content_moderation/ tests/ src/ Kernel/ ContentModerationWorkflowConfigTest.php, line 55 
Class
- ContentModerationWorkflowConfigTest
- Tests how Content Moderation handles workflow config changes.
Namespace
Drupal\Tests\content_moderation\KernelCode
protected function setUp() : void {
  parent::setUp();
  $this->installSchema('node', 'node_access');
  $this->installEntitySchema('node');
  $this->installEntitySchema('user');
  $this->installEntitySchema('content_moderation_state');
  $this->installConfig([
    'system',
    'content_moderation',
  ]);
  NodeType::create([
    'type' => 'example',
  ])->save();
  $workflow = $this->createEditorialWorkflow();
  $workflow->getTypePlugin()
    ->addState('test1', 'Test one')
    ->addState('test2', 'Test two')
    ->addState('test3', 'Test three')
    ->addEntityTypeAndBundle('node', 'example');
  $workflow->save();
  $this->workflow = $workflow;
  $this->copyConfig($this->container
    ->get('config.storage'), $this->container
    ->get('config.storage.sync'));
}Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.
