summaryrefslogtreecommitdiff
path: root/modules
diff options
context:
space:
mode:
authorAngie Byron <webchick@24967.no-reply.drupal.org>2010-04-23 05:46:01 +0000
committerAngie Byron <webchick@24967.no-reply.drupal.org>2010-04-23 05:46:01 +0000
commit6e82d23e9717a55417fe53a478aff2d80698d2f0 (patch)
treeb597436fffc5ac90558e5411cf71a6f347460f3e /modules
parent3622e5f7a83bc70229d8e2d71473032c5cf4823b (diff)
downloadbrdo-6e82d23e9717a55417fe53a478aff2d80698d2f0.tar.gz
brdo-6e82d23e9717a55417fe53a478aff2d80698d2f0.tar.bz2
#758690 by solotandem: Set the user agent for Unit Test Case for consistency with Web Test Case.
Diffstat (limited to 'modules')
-rw-r--r--modules/simpletest/drupal_web_test_case.php3
1 files changed, 3 insertions, 0 deletions
diff --git a/modules/simpletest/drupal_web_test_case.php b/modules/simpletest/drupal_web_test_case.php
index 2db22c06b..25e6b3972 100644
--- a/modules/simpletest/drupal_web_test_case.php
+++ b/modules/simpletest/drupal_web_test_case.php
@@ -575,6 +575,9 @@ class DrupalUnitTestCase extends DrupalTestCase {
$db_prefix = Database::getConnection()->prefixTables('{simpletest' . mt_rand(1000, 1000000) . '}');
$conf['file_public_path'] = $this->originalFileDirectory . '/' . $db_prefix;
+ // Set user agent to be consistent with web test case.
+ $_SERVER['HTTP_USER_AGENT'] = $db_prefix;
+
// If locale is enabled then t() will try to access the database and
// subsequently will fail as the database is not accessible.
$module_list = module_list();