function AddModerationConfigActionTest::createRecipe

Same name in other branches
  1. 11.x core/modules/content_moderation/tests/src/Kernel/ConfigAction/AddModerationConfigActionTest.php \Drupal\Tests\content_moderation\Kernel\ConfigAction\AddModerationConfigActionTest::createRecipe()
3 calls to AddModerationConfigActionTest::createRecipe()
AddModerationConfigActionTest::testActionOnlyTargetsWorkflows in core/modules/content_moderation/tests/src/Kernel/ConfigAction/AddModerationConfigActionTest.php
AddModerationConfigActionTest::testAddEntityTypeAndBundle in core/modules/content_moderation/tests/src/Kernel/ConfigAction/AddModerationConfigActionTest.php
AddModerationConfigActionTest::testWorkflowMustBeContentModeration in core/modules/content_moderation/tests/src/Kernel/ConfigAction/AddModerationConfigActionTest.php

File

core/modules/content_moderation/tests/src/Kernel/ConfigAction/AddModerationConfigActionTest.php, line 94

Class

AddModerationConfigActionTest
@covers \Drupal\content_moderation\Plugin\ConfigAction\AddModeration @covers \Drupal\content_moderation\Plugin\ConfigAction\AddModerationDeriver @group content_moderation @group Recipe

Namespace

Drupal\Tests\content_moderation\Kernel\ConfigAction

Code

private function createRecipe(string $config_name) : Recipe {
    $recipe = <<<YAML
name: 'Add entity types and bundles to workflow'
recipes:
  - core/recipes/editorial_workflow
config:
  actions:
    {<span class="php-variable">$config_name</span>}:
      addNodeTypes:
        - a
        - b
      addTaxonomyVocabularies: '*'
YAML;
    return $this->traitCreateRecipe($recipe);
}

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