diff options
author | Angie Byron <webchick@24967.no-reply.drupal.org> | 2010-01-02 18:56:20 +0000 |
---|---|---|
committer | Angie Byron <webchick@24967.no-reply.drupal.org> | 2010-01-02 18:56:20 +0000 |
commit | 45bc7c2290af947cda8747f08598413a764e24c8 (patch) | |
tree | 0e06259de2e1991fd494103bdcf7a80ba68fdc03 /modules/simpletest/drupal_web_test_case.php | |
parent | 28725705814a5ac25dbcc1665503325b44352f7d (diff) | |
download | brdo-45bc7c2290af947cda8747f08598413a764e24c8.tar.gz brdo-45bc7c2290af947cda8747f08598413a764e24c8.tar.bz2 |
#399642 by sndev and carlos8f: Make drupal_install_modules() resolve dependencies and trigger an error when they do not exist. (with tests)
Diffstat (limited to 'modules/simpletest/drupal_web_test_case.php')
-rw-r--r-- | modules/simpletest/drupal_web_test_case.php | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/modules/simpletest/drupal_web_test_case.php b/modules/simpletest/drupal_web_test_case.php index 186195d28..6599fa1e1 100644 --- a/modules/simpletest/drupal_web_test_case.php +++ b/modules/simpletest/drupal_web_test_case.php @@ -1140,17 +1140,14 @@ class DrupalWebTestCase extends DrupalTestCase { variable_set('install_profile', 'default'); $profile_details = install_profile_info('default', 'en'); - // Add the specified modules to the list of modules in the default profile. // Install the modules specified by the default profile. drupal_install_modules($profile_details['dependencies'], TRUE); drupal_static_reset('_node_types_build'); - // Install additional modules one at a time in order to make sure that the - // list of modules is updated between each module's installation. - $modules = func_get_args(); - foreach ($modules as $module) { - drupal_install_modules(array($module), TRUE); + if ($modules = func_get_args()) { + // Install modules needed for this test. + drupal_install_modules($modules, TRUE); } // Because the schema is static cached, we need to flush |