summaryrefslogtreecommitdiff
path: root/modules/simpletest
diff options
context:
space:
mode:
Diffstat (limited to 'modules/simpletest')
-rw-r--r--modules/simpletest/drupal_web_test_case.php5
-rw-r--r--modules/simpletest/tests/module.test4
2 files changed, 7 insertions, 2 deletions
diff --git a/modules/simpletest/drupal_web_test_case.php b/modules/simpletest/drupal_web_test_case.php
index 51b983a34..893c7e8c6 100644
--- a/modules/simpletest/drupal_web_test_case.php
+++ b/modules/simpletest/drupal_web_test_case.php
@@ -1037,6 +1037,7 @@ class DrupalWebTestCase extends DrupalTestCase {
$this->originalLanguageDefault = variable_get('language_default');
$this->originalPrefix = $db_prefix;
$this->originalFileDirectory = file_directory_path();
+ $this->originalProfile = drupal_get_profile();
$clean_url_original = variable_get('clean_url', 0);
// Generate temporary prefixed database to ensure that tests have a clean starting point.
@@ -1062,7 +1063,7 @@ class DrupalWebTestCase extends DrupalTestCase {
$this->preloadRegistry();
// Include the default profile
- require_once('./profiles/default/default.profile');
+ 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.
@@ -1086,7 +1087,7 @@ class DrupalWebTestCase extends DrupalTestCase {
// Run default profile tasks.
$install_state = array();
- default_profile_site_setup($install_state);
+ drupal_install_modules(array('default'), TRUE);
// Rebuild caches.
node_types_rebuild();
diff --git a/modules/simpletest/tests/module.test b/modules/simpletest/tests/module.test
index ee95044e0..5c703c287 100644
--- a/modules/simpletest/tests/module.test
+++ b/modules/simpletest/tests/module.test
@@ -25,6 +25,10 @@ class ModuleUnitTest extends DrupalWebTestCase {
// Build a list of modules, sorted alphabetically.
$profile_info = install_profile_info('default', 'en');
$module_list = $profile_info['dependencies'];
+
+ // Install profile is a module that is expected to be loaded.
+ $module_list[] = 'default';
+
sort($module_list);
// Compare this list to the one returned by module_list(). We expect them
// to match, since all default profile modules have a weight equal to 0