function ConfigInstallTest::installModules

Same name in other branches
  1. 9 core/tests/Drupal/KernelTests/Core/Config/ConfigInstallTest.php \Drupal\KernelTests\Core\Config\ConfigInstallTest::installModules()
  2. 8.9.x core/tests/Drupal/KernelTests/Core/Config/ConfigInstallTest.php \Drupal\KernelTests\Core\Config\ConfigInstallTest::installModules()
  3. 11.x core/tests/Drupal/KernelTests/Core/Config/ConfigInstallTest.php \Drupal\KernelTests\Core\Config\ConfigInstallTest::installModules()

Installs a module.

Parameters

array $modules: The module names.

5 calls to ConfigInstallTest::installModules()
ConfigInstallTest::testCollectionInstallationCollectionConfigEntity in core/tests/Drupal/KernelTests/Core/Config/ConfigInstallTest.php
Tests collections which do not support config entities install correctly.
ConfigInstallTest::testDependencyChecking in core/tests/Drupal/KernelTests/Core/Config/ConfigInstallTest.php
Tests the configuration with unmet dependencies is not installed.
ConfigInstallTest::testIdMisMatch in core/tests/Drupal/KernelTests/Core/Config/ConfigInstallTest.php
Tests installing configuration where the filename and ID do not match.
ConfigInstallTest::testLanguage in core/tests/Drupal/KernelTests/Core/Config/ConfigInstallTest.php
Tests imported configuration entities with/without language information.
ConfigInstallTest::testModuleInstallation in core/tests/Drupal/KernelTests/Core/Config/ConfigInstallTest.php
Tests module installation.

File

core/tests/Drupal/KernelTests/Core/Config/ConfigInstallTest.php, line 279

Class

ConfigInstallTest
Tests installation of configuration objects in installation functionality.

Namespace

Drupal\KernelTests\Core\Config

Code

protected function installModules(array $modules) {
    $this->container
        ->get('module_installer')
        ->install($modules);
    $this->container = \Drupal::getContainer();
}

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