You are here

protected function StateFormatterTest::setUp in Drupal 8

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()

Overrides KernelTestBase::setUp

File

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

Class

StateFormatterTest
Test the state field formatter.

Namespace

Drupal\Tests\content_moderation\Kernel

Code

protected function setUp() {
  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();
}