function RecipeRunnerTest::testInvalidConfigAction

Same name in other branches
  1. 11.x core/tests/Drupal/KernelTests/Core/Recipe/RecipeRunnerTest.php \Drupal\KernelTests\Core\Recipe\RecipeRunnerTest::testInvalidConfigAction()

File

core/tests/Drupal/KernelTests/Core/Recipe/RecipeRunnerTest.php, line 203

Class

RecipeRunnerTest
@coversDefaultClass \Drupal\Core\Recipe\RecipeRunner @group Recipe

Namespace

Drupal\KernelTests\Core\Recipe

Code

public function testInvalidConfigAction() : void {
    $recipe_data = <<<YAML
name: Invalid config action
install:
  - config_test
config:
  actions:
    config_test.system:
      setFoo: 'Bar'
YAML;
    $recipe = $this->createRecipe($recipe_data);
    $this->expectException(PluginNotFoundException::class);
    $this->expectExceptionMessage('The "setFoo" plugin does not exist.');
    RecipeRunner::processRecipe($recipe);
}

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