Updated to Drupal 8.5. Core Media not yet in use.
[yaffs-website] / web / core / tests / Drupal / KernelTests / Core / Extension / ModuleInstallerTest.php
index ff183c6f00dbf3f59e8d2fb1ccc094656cc886b2..7ffe65c9fc33392bf7b6420f5596cc2b0f78346f 100644 (file)
@@ -85,4 +85,13 @@ class ModuleInstallerTest extends KernelTestBase {
     $this->assertFalse($schema->tableExists($table));
   }
 
+  /**
+   * Ensure that rebuilding the container in hook_install() works.
+   */
+  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']));
+  }
+
 }