You are here

protected function ViewsDataIntegrationTest::setUp in Drupal 10

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

File

core/modules/content_moderation/tests/src/Kernel/ViewsDataIntegrationTest.php, line 34

Class

ViewsDataIntegrationTest
Tests the views integration of content_moderation.

Namespace

Drupal\Tests\content_moderation\Kernel

Code

protected function setUp($import_test_views = TRUE) : void {
  parent::setUp($import_test_views);
  $this
    ->installEntitySchema('node');
  $this
    ->installEntitySchema('entity_test_mulrevpub');
  $this
    ->installEntitySchema('user');
  $this
    ->installEntitySchema('content_moderation_state');
  $this
    ->installSchema('node', 'node_access');
  $this
    ->installConfig('content_moderation');
  $node_type = NodeType::create([
    'type' => 'page',
  ]);
  $node_type
    ->save();
  $workflow = $this
    ->createEditorialWorkflow();
  $workflow
    ->getTypePlugin()
    ->addEntityTypeAndBundle('node', 'page');
  $workflow
    ->getTypePlugin()
    ->addEntityTypeAndBundle('entity_test_mulrevpub', 'entity_test_mulrevpub');
  $workflow
    ->save();
  $this
    ->installConfig('content_moderation_test_views');
}