Commit 6e82d23e authored by webchick's avatar webchick

#758690 by solotandem: Set the user agent for Unit Test Case for consistency with Web Test Case.

parent 3622e5f7
......@@ -575,6 +575,9 @@ protected function setUp() {
$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();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment