function AddModerationConfigActionTest::createRecipe
Same name and namespace in other branches
- 10 core/modules/content_moderation/tests/src/Kernel/ConfigAction/AddModerationConfigActionTest.php \Drupal\Tests\content_moderation\Kernel\ConfigAction\AddModerationConfigActionTest::createRecipe()
Creates a recipe configuration for adding entity types and bundles to a workflow.
3 calls to AddModerationConfigActionTest::createRecipe()
- AddModerationConfigActionTest::testActionOnlyTargetsWorkflows in core/
modules/ content_moderation/ tests/ src/ Kernel/ ConfigAction/ AddModerationConfigActionTest.php - Tests that the action only targets workflows.
- AddModerationConfigActionTest::testAddEntityTypeAndBundle in core/
modules/ content_moderation/ tests/ src/ Kernel/ ConfigAction/ AddModerationConfigActionTest.php - Tests adding entity types and bundles to a workflow.
- AddModerationConfigActionTest::testWorkflowMustBeContentModeration in core/
modules/ content_moderation/ tests/ src/ Kernel/ ConfigAction/ AddModerationConfigActionTest.php - Tests that the workflow must be of type Content Moderation.
File
-
core/
modules/ content_moderation/ tests/ src/ Kernel/ ConfigAction/ AddModerationConfigActionTest.php, line 110
Class
- AddModerationConfigActionTest
- @covers \Drupal\content_moderation\Plugin\ConfigAction\AddModeration[[api-linebreak]] @covers \Drupal\content_moderation\Plugin\ConfigAction\AddModerationDeriver[[api-linebreak]] @group content_moderation @group Recipe
Namespace
Drupal\Tests\content_moderation\Kernel\ConfigActionCode
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.