You are here

protected function ModerationStateAccessTest::setUp in Drupal 9

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

Overrides BrowserTestBase::setUp

File

core/modules/content_moderation/tests/src/Functional/ModerationStateAccessTest.php, line 35

Class

ModerationStateAccessTest
Tests the view access control handler for moderation state entities.

Namespace

Drupal\Tests\content_moderation\Functional

Code

protected function setUp() : void {
  parent::setUp();
  $node_type = NodeType::create([
    'type' => 'test',
    'label' => 'Test',
  ]);
  $node_type
    ->save();
  $workflow = $this
    ->createEditorialWorkflow();
  $workflow
    ->getTypePlugin()
    ->addEntityTypeAndBundle('node', 'test');
  $workflow
    ->save();
  $this->container
    ->get('module_installer')
    ->install([
    'content_moderation_test_views',
  ]);
}