function StateFormatterTest::setUp

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

Overrides KernelTestBase::setUp

File

core/modules/content_moderation/tests/src/Kernel/StateFormatterTest.php, line 36

Class

StateFormatterTest
Test the state field formatter.

Namespace

Drupal\Tests\content_moderation\Kernel

Code

protected function setUp() : void {
    parent::setUp();
    $this->installEntitySchema('entity_test_rev');
    $this->installEntitySchema('content_moderation_state');
    $this->installConfig('content_moderation');
    $workflow = $this->createEditorialWorkflow();
    $workflow->getTypePlugin()
        ->addEntityTypeAndBundle('entity_test_rev', 'entity_test_rev');
    $workflow->save();
}

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