diff --git a/core/modules/simpletest/lib/Drupal/simpletest/DrupalUnitTestBase.php b/core/modules/simpletest/lib/Drupal/simpletest/DrupalUnitTestBase.php index bfbca8f..a68392f 100644 --- a/core/modules/simpletest/lib/Drupal/simpletest/DrupalUnitTestBase.php +++ b/core/modules/simpletest/lib/Drupal/simpletest/DrupalUnitTestBase.php @@ -98,7 +98,7 @@ protected function setUp() { $this->baseContainer = clone $this->container; // Bootstrap the kernel. - $this->kernel = new DrupalKernel('testing', TRUE, array_keys($this->moduleList)); + $this->kernel = new DrupalKernel('testing', TRUE, drupal_classloader()); $this->kernel->boot(); $this->container = drupal_container(); @@ -204,8 +204,10 @@ protected function installSchema($module, $table) { */ protected function enableModules(array $modules, $install = TRUE) { // Set the modules in the fixed module_list(). + $new_enabled = array(); foreach ($modules as $module) { $this->moduleList[$module]['filename'] = drupal_get_filename('module', $module); + $new_enabled[$module] = dirname($this->moduleList[$module]['filename']); module_list(NULL, $this->moduleList); // Call module_enable() to enable (install) the new module. @@ -228,7 +230,7 @@ protected function enableModules(array $modules, $install = TRUE) { module_implements_reset(); } $kernel = $this->container->get('kernel'); - $kernel->updateModules(array_keys($this->moduleList), clone $this->baseContainer); + $kernel->updateModules($this->moduleList, $new_enabled, clone $this->baseContainer); } }