summaryrefslogtreecommitdiff
path: root/modules
diff options
context:
space:
mode:
authorwebchick <webchick@24967.no-reply.drupal.org>2011-07-28 14:55:57 -0400
committerwebchick <webchick@24967.no-reply.drupal.org>2011-07-28 14:55:57 -0400
commitb3e2b2ad52d6ef28996626bfba92fbac7d29a2dc (patch)
tree0ea9fc783496cd38d25aaf2f65c4950398ba24ee /modules
parent4f833a7e0a38359cf34f556c8e4cce781880623e (diff)
downloadbrdo-b3e2b2ad52d6ef28996626bfba92fbac7d29a2dc.tar.gz
brdo-b3e2b2ad52d6ef28996626bfba92fbac7d29a2dc.tar.bz2
Issue #276153 by pwolanin, das-peter: Fixed Testing does not work at all when locale of host session is not English.
Diffstat (limited to 'modules')
-rw-r--r--modules/simpletest/drupal_web_test_case.php5
1 files changed, 5 insertions, 0 deletions
diff --git a/modules/simpletest/drupal_web_test_case.php b/modules/simpletest/drupal_web_test_case.php
index 40af45858..5c39cfc11 100644
--- a/modules/simpletest/drupal_web_test_case.php
+++ b/modules/simpletest/drupal_web_test_case.php
@@ -1255,6 +1255,11 @@ class DrupalWebTestCase extends DrupalTestCase {
$this->originalProfile = drupal_get_profile();
$clean_url_original = variable_get('clean_url', 0);
+ // Set to English to prevent exceptions from utf8_truncate() from t()
+ // during install if the current language is not 'en'.
+ // The following array/object conversion is copied from language_default().
+ $language = (object) array('language' => 'en', 'name' => 'English', 'native' => 'English', 'direction' => 0, 'enabled' => 1, 'plurals' => 0, 'formula' => '', 'domain' => '', 'prefix' => '', 'weight' => 0, 'javascript' => '');
+
// Save and clean shutdown callbacks array because it static cached and
// will be changed by the test run. If we don't, then it will contain
// callbacks from both environments. So testing environment will try