function RecipeTest::testExampleRecipe
Same name in other branches
- 11.x core/tests/Drupal/KernelTests/Core/Recipe/RecipeTest.php \Drupal\KernelTests\Core\Recipe\RecipeTest::testExampleRecipe()
File
-
core/
tests/ Drupal/ KernelTests/ Core/ Recipe/ RecipeTest.php, line 74
Class
- RecipeTest
- @coversDefaultClass \Drupal\Core\Recipe\Recipe @group Recipe
Namespace
Drupal\KernelTests\Core\RecipeCode
public function testExampleRecipe() : void {
// The example recipe imports all the configurations from the node module
// including optional configurations associated with the search and view
// modules. So we have to install them before applying the example recipe.
$this->container
->get('module_installer')
->install([
'search',
'views',
]);
// Apply the example recipe.
$recipe = Recipe::createFromDirectory('core/recipes/example');
RecipeRunner::processRecipe($recipe);
// Verify if the 'default_summary_length' value is updated.
$this->assertSame($this->config('text.settings')
->get('default_summary_length'), 700);
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.