function RecipeRunnerTest::testInvalidConfigActionAppliedOnConfigEntity
Tests a recipe with an invalid action configuration.
File
-
core/
tests/ Drupal/ KernelTests/ Core/ Recipe/ RecipeRunnerTest.php, line 265
Class
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.