function ContentModerationStateStorageSchemaTest::setUp

Same name and namespace in other branches
  1. 9 core/modules/content_moderation/tests/src/Kernel/ContentModerationStateStorageSchemaTest.php \Drupal\Tests\content_moderation\Kernel\ContentModerationStateStorageSchemaTest::setUp()
  2. 8.9.x core/modules/content_moderation/tests/src/Kernel/ContentModerationStateStorageSchemaTest.php \Drupal\Tests\content_moderation\Kernel\ContentModerationStateStorageSchemaTest::setUp()
  3. 11.x core/modules/content_moderation/tests/src/Kernel/ContentModerationStateStorageSchemaTest.php \Drupal\Tests\content_moderation\Kernel\ContentModerationStateStorageSchemaTest::setUp()

Overrides KernelTestBase::setUp

File

core/modules/content_moderation/tests/src/Kernel/ContentModerationStateStorageSchemaTest.php, line 39

Class

ContentModerationStateStorageSchemaTest
Test the ContentModerationState storage schema.

Namespace

Drupal\Tests\content_moderation\Kernel

Code

protected function setUp() : void {
  parent::setUp();
  $this->installSchema('node', 'node_access');
  $this->installEntitySchema('node');
  $this->installEntitySchema('entity_test');
  $this->installEntitySchema('user');
  $this->installEntitySchema('content_moderation_state');
  $this->installConfig('content_moderation');
  NodeType::create([
    'type' => 'example',
    'name' => 'Example',
  ])->save();
  $workflow = $this->createEditorialWorkflow();
  $workflow->getTypePlugin()
    ->addEntityTypeAndBundle('node', 'example');
  $workflow->save();
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.