function RecipeRunnerTest::testConfigFromModule
Same name in other branches
- 11.x core/tests/Drupal/KernelTests/Core/Recipe/RecipeRunnerTest.php \Drupal\KernelTests\Core\Recipe\RecipeRunnerTest::testConfigFromModule()
File
-
core/
tests/ Drupal/ KernelTests/ Core/ Recipe/ RecipeRunnerTest.php, line 109
Class
- RecipeRunnerTest
- @coversDefaultClass \Drupal\Core\Recipe\RecipeRunner @group Recipe
Namespace
Drupal\KernelTests\Core\RecipeCode
public function testConfigFromModule() : void {
// Test the state prior to applying the recipe.
$this->assertEmpty($this->container
->get('config.factory')
->listAll('config_test.'), 'There is no config_test configuration');
$recipe = Recipe::createFromDirectory('core/tests/fixtures/recipes/config_from_module');
RecipeRunner::processRecipe($recipe);
// Test the state after to applying the recipe.
$this->assertNotEmpty($this->container
->get('config.factory')
->listAll('config_test.'), 'There is config_test configuration');
$config_test_entities = \Drupal::entityTypeManager()->getStorage('config_test')
->loadMultiple();
$this->assertSame([
'dotted.default',
'override',
], array_keys($config_test_entities));
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.