From d8ca025908b6b39b6837acd1612cffcad13ec845 Mon Sep 17 00:00:00 2001 From: Nathaniel <catch@35733.no-reply.drupal.org> Date: Tue, 20 Dec 2011 14:43:51 +0900 Subject: [PATCH] Issue #1373634 by sun: Fixed Installation profile is not installed and not registered as module, unless identical to parent site. --- core/modules/simpletest/drupal_web_test_case.php | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/core/modules/simpletest/drupal_web_test_case.php b/core/modules/simpletest/drupal_web_test_case.php index 0edd3fd5f586..a5fb606a109a 100644 --- a/core/modules/simpletest/drupal_web_test_case.php +++ b/core/modules/simpletest/drupal_web_test_case.php @@ -1355,6 +1355,13 @@ protected function setUp() { $test_info['test_run_id'] = $this->databasePrefix; $test_info['in_child_site'] = FALSE; + // Preset the 'install_profile' system variable, so the first call into + // system_rebuild_module_data() (in drupal_install_system()) will register + // the test's profile as a module. Without this, the installation profile of + // the parent site (executing the test) is registered, and the test + // profile's hook_install() and other hook implementations are never invoked. + $conf['install_profile'] = $this->profile; + include_once DRUPAL_ROOT . '/core/includes/install.inc'; drupal_install_system(); -- GitLab