You are here

protected function WorkflowCollectorTest::createContentType in Workbench Moderation to Content Moderation 8.2

Creates a moderated content type.

Parameters

string $id: The content type ID.

string[] $moderation_states: The moderation states that the content type should allow.

1 call to WorkflowCollectorTest::createContentType()
WorkflowCollectorTest::setUp in tests/src/Kernel/WorkflowCollectorTest.php

File

tests/src/Kernel/WorkflowCollectorTest.php, line 268

Class

WorkflowCollectorTest
@covers \Drupal\wbm2cm\WorkflowCollector @group wbm2cm

Namespace

Drupal\Tests\wbm2cm\Kernel

Code

protected function createContentType($id, array $moderation_states) {
  $this
    ->drupalCreateContentType([
    'type' => $id,
  ])
    ->setThirdPartySetting('workbench_moderation', 'enabled', TRUE)
    ->setThirdPartySetting('workbench_moderation', 'allowed_moderation_states', $moderation_states)
    ->save();
}