function InstallConfiguratorTest::testDependenciesAreAutomaticallyIncluded
Same name in other branches
- 11.x core/tests/Drupal/KernelTests/Core/Recipe/InstallConfiguratorTest.php \Drupal\KernelTests\Core\Recipe\InstallConfiguratorTest::testDependenciesAreAutomaticallyIncluded()
File
-
core/
tests/ Drupal/ KernelTests/ Core/ Recipe/ InstallConfiguratorTest.php, line 18
Class
- InstallConfiguratorTest
- @covers \Drupal\Core\Recipe\InstallConfigurator @group Recipe
Namespace
Drupal\KernelTests\Core\RecipeCode
public function testDependenciesAreAutomaticallyIncluded() : void {
$configurator = new InstallConfigurator([
'node',
'test_theme_depending_on_modules',
], $this->container
->get(ModuleExtensionList::class), $this->container
->get(ThemeExtensionList::class));
// Node and its dependencies should be listed.
$this->assertContains('node', $configurator->modules);
$this->assertContains('text', $configurator->modules);
$this->assertContains('field', $configurator->modules);
$this->assertContains('filter', $configurator->modules);
// The test theme, along with its module AND theme dependencies, should be
// listed.
$this->assertContains('test_theme_depending_on_modules', $configurator->themes);
$this->assertContains('test_module_required_by_theme', $configurator->modules);
$this->assertContains('test_another_module_required_by_theme', $configurator->modules);
$this->assertContains('stark', $configurator->themes);
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.