function ModuleInstallerTest::testKernelRebuildDuringHookInstall
Ensure that rebuilding the container in hook_install() works.
File
- 
              core/tests/ Drupal/ KernelTests/ Core/ Extension/ ModuleInstallerTest.php, line 84 
Class
- ModuleInstallerTest
- Tests the ModuleInstaller class.
Namespace
Drupal\KernelTests\Core\ExtensionCode
public function testKernelRebuildDuringHookInstall() {
  \Drupal::state()->set('module_test_install:rebuild_container', TRUE);
  $module_installer = $this->container
    ->get('module_installer');
  $this->assertTrue($module_installer->install([
    'module_test',
  ]));
}Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.
