
| Current Path : /var/www/html/strat/web/core/tests/Drupal/KernelTests/Core/Recipe/ |
Linux ift1.ift-informatik.de 5.4.0-216-generic #236-Ubuntu SMP Fri Apr 11 19:53:21 UTC 2025 x86_64 |
| Current File : /var/www/html/strat/web/core/tests/Drupal/KernelTests/Core/Recipe/InstallConfiguratorTest.php |
<?php
declare(strict_types=1);
namespace Drupal\KernelTests\Core\Recipe;
use Drupal\Core\Extension\ModuleExtensionList;
use Drupal\Core\Extension\ThemeExtensionList;
use Drupal\Core\Recipe\InstallConfigurator;
use Drupal\KernelTests\KernelTestBase;
/**
* @covers \Drupal\Core\Recipe\InstallConfigurator
* @group Recipe
*/
class InstallConfiguratorTest extends KernelTestBase {
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);
}
}