public function ModuleInstallerTest::testKernelRebuildDuringHookInstall in Drupal 8
Same name and namespace in other branches
- 9 core/tests/Drupal/KernelTests/Core/Extension/ModuleInstallerTest.php \Drupal\KernelTests\Core\Extension\ModuleInstallerTest::testKernelRebuildDuringHookInstall()
- 10 core/tests/Drupal/KernelTests/Core/Extension/ModuleInstallerTest.php \Drupal\KernelTests\Core\Extension\ModuleInstallerTest::testKernelRebuildDuringHookInstall()
Ensure that rebuilding the container in hook_install() works.
File
- core/
tests/ Drupal/ KernelTests/ Core/ Extension/ ModuleInstallerTest.php, line 83
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',
]));
}