protected function KernelTestBase::installConfig in Drupal 8
Same name in this branch
- 8 core/tests/Drupal/KernelTests/KernelTestBase.php \Drupal\KernelTests\KernelTestBase::installConfig()
 - 8 core/modules/simpletest/src/KernelTestBase.php \Drupal\simpletest\KernelTestBase::installConfig()
 
Same name and namespace in other branches
- 9 core/tests/Drupal/KernelTests/KernelTestBase.php \Drupal\KernelTests\KernelTestBase::installConfig()
 
Installs default configuration for a given list of modules.
Parameters
string|string[] $modules: A module or list of modules for which to install default configuration.
Throws
\LogicException If any module in $modules is not enabled.
300 calls to KernelTestBase::installConfig()
- AggregatorTitleTest::setUp in core/
modules/ aggregator/ tests/ src/ Kernel/ AggregatorTitleTest.php  - AreaDisplayLinkTest::setUp in core/
modules/ views/ tests/ src/ Kernel/ Handler/ AreaDisplayLinkTest.php  - AreaEntityTest::setUpFixtures in core/
modules/ views/ tests/ src/ Kernel/ Handler/ AreaEntityTest.php  - Sets up the configuration and schema of views and views_test_data modules.
 - AreaTextTest::setUp in core/
modules/ views/ tests/ src/ Kernel/ Handler/ AreaTextTest.php  - ArgumentUidRevisionTest::setUp in core/
modules/ node/ tests/ src/ Kernel/ Views/ ArgumentUidRevisionTest.php  
File
- core/
tests/ Drupal/ KernelTests/ KernelTestBase.php, line 689  
Class
- KernelTestBase
 - Base class for functional integration tests.
 
Namespace
Drupal\KernelTestsCode
protected function installConfig($modules) {
  foreach ((array) $modules as $module) {
    if (!$this->container
      ->get('module_handler')
      ->moduleExists($module)) {
      throw new \LogicException("{$module} module is not enabled.");
    }
    $this->container
      ->get('config.installer')
      ->installDefaultConfig('module', $module);
  }
}