function RecipeTest::testPreExistingMatchingConfiguration

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

File

core/tests/Drupal/KernelTests/Core/Recipe/RecipeTest.php, line 63

Class

RecipeTest
@coversDefaultClass \Drupal\Core\Recipe\Recipe @group Recipe

Namespace

Drupal\KernelTests\Core\Recipe

Code

public function testPreExistingMatchingConfiguration() : void {
    // Install the node module, its dependencies and configuration.
    $this->container
        ->get('module_installer')
        ->install([
        'node',
    ]);
    // Change the config to match the recipe's config to prevent the exception
    // being thrown.
    $this->config('node.settings')
        ->set('use_admin_theme', TRUE)
        ->save();
    $recipe = Recipe::createFromDirectory('core/tests/fixtures/recipes/install_node_with_config');
    $this->assertSame('core/tests/fixtures/recipes/install_node_with_config/config', $recipe->config->recipeConfigDirectory);
}

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