function RecipeRunnerTest::testModuleConfigHasDefaultConfigHash
Same name and namespace in other branches
- 11.x core/tests/Drupal/KernelTests/Core/Recipe/RecipeRunnerTest.php \Drupal\KernelTests\Core\Recipe\RecipeRunnerTest::testModuleConfigHasDefaultConfigHash()
Tests that module config installed by a recipe has a default config hash.
File
-
core/
tests/ Drupal/ KernelTests/ Core/ Recipe/ RecipeRunnerTest.php, line 353
Class
Namespace
Drupal\KernelTests\Core\RecipeCode
public function testModuleConfigHasDefaultConfigHash() : void {
$recipe = Recipe::createFromDirectory('core/tests/fixtures/recipes/install_two_modules');
RecipeRunner::processRecipe($recipe);
$data = $this->container
->get('config.storage')
->read('node.settings');
$module_data = Yaml::decode(file_get_contents('core/modules/node/config/install/node.settings.yml'));
$this->assertSame(Crypt::hashBase64(serialize($module_data)), $data['_core']['default_config_hash']);
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.