function RecipeRunnerTest::testInvalidConfigActionAppliedOnConfigEntity
Same name in other branches
- 11.x core/tests/Drupal/KernelTests/Core/Recipe/RecipeRunnerTest.php \Drupal\KernelTests\Core\Recipe\RecipeRunnerTest::testInvalidConfigActionAppliedOnConfigEntity()
File
-
core/
tests/ Drupal/ KernelTests/ Core/ Recipe/ RecipeRunnerTest.php, line 220
Class
- RecipeRunnerTest
- @coversDefaultClass \Drupal\Core\Recipe\RecipeRunner @group Recipe
Namespace
Drupal\KernelTests\Core\RecipeCode
public function testInvalidConfigActionAppliedOnConfigEntity() : void {
$recipe_data = <<<YAML
name: Invalid config action
install:
- config_test
config:
actions:
config_test.dynamic.recipe:
createIfNotExists:
label: 'Created by recipe'
setBody: 'Description set by recipe'
YAML;
$recipe = $this->createRecipe($recipe_data);
$this->expectException(PluginNotFoundException::class);
$this->expectExceptionMessage('The "config_test" entity does not support the "setBody" config action.');
RecipeRunner::processRecipe($recipe);
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.