#347959: modules can't safely fire hooks during simpletest installation phase.

From: Damien Tournoud <damien@tournoud.net>


---

 modules/simpletest/drupal_web_test_case.php |    5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)


diff --git modules/simpletest/drupal_web_test_case.php modules/simpletest/drupal_web_test_case.php
index 0e9702f..20d5b1f 100644
--- modules/simpletest/drupal_web_test_case.php
+++ modules/simpletest/drupal_web_test_case.php
@@ -793,6 +793,11 @@ class DrupalWebTestCase {
 
     $this->preloadRegistry();
 
+    // Refresh the module list and the implementation cache so that modules
+    // are installed in a clean environment and can safely fire hooks.
+    module_list(TRUE);
+    module_implements(MODULE_IMPLEMENTS_CLEAR_CACHE);
+
     // Add the specified modules to the list of modules in the default profile.
     $args = func_get_args();
     $modules = array_unique(array_merge(drupal_get_profile_modules('default', 'en'), $args));
