function RecipeRunnerTest::testThemeModuleDependenciesInstall
Same name in other branches
- 11.x core/tests/Drupal/KernelTests/Core/Recipe/RecipeRunnerTest.php \Drupal\KernelTests\Core\Recipe\RecipeRunnerTest::testThemeModuleDependenciesInstall()
File
-
core/
tests/ Drupal/ KernelTests/ Core/ Recipe/ RecipeRunnerTest.php, line 58
Class
- RecipeRunnerTest
- @coversDefaultClass \Drupal\Core\Recipe\RecipeRunner @group Recipe
Namespace
Drupal\KernelTests\Core\RecipeCode
public function testThemeModuleDependenciesInstall() : void {
$recipe = Recipe::createFromDirectory('core/tests/fixtures/recipes/theme_with_module_dependencies');
RecipeRunner::processRecipe($recipe);
// Test the state after applying the recipe.
$this->assertTrue($this->container
->get('module_handler')
->moduleExists('test_module_required_by_theme'), 'The test_module_required_by_theme module is installed');
$this->assertTrue($this->container
->get('module_handler')
->moduleExists('test_another_module_required_by_theme'), 'The test_another_module_required_by_theme module is installed');
$this->assertTrue($this->container
->get('theme_handler')
->themeExists('test_theme_depending_on_modules'), 'The test_theme_depending_on_modules theme is installed');
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.