summaryrefslogtreecommitdiff
path: root/modules/simpletest
diff options
context:
space:
mode:
authorAngie Byron <webchick@24967.no-reply.drupal.org>2009-08-21 07:50:08 +0000
committerAngie Byron <webchick@24967.no-reply.drupal.org>2009-08-21 07:50:08 +0000
commit716293e0fbf1155b8e78c4bd2762c98275b8e6cb (patch)
treea8dd7691cd035f407268e41969ffbb033871bc36 /modules/simpletest
parentd151ea91004abd0c771dfeea380ff4fef0fbf248 (diff)
downloadbrdo-716293e0fbf1155b8e78c4bd2762c98275b8e6cb.tar.gz
brdo-716293e0fbf1155b8e78c4bd2762c98275b8e6cb.tar.bz2
#509398 by adrian: Turned install profiles into modules with full access to the Drupal API. Almost all WTFs/minute now removed from install profiles. Woohoo! :D
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