summaryrefslogtreecommitdiff
path: root/modules/locale/locale.test
diff options
context:
space:
mode:
Diffstat (limited to 'modules/locale/locale.test')
-rw-r--r--modules/locale/locale.test15
1 files changed, 13 insertions, 2 deletions
diff --git a/modules/locale/locale.test b/modules/locale/locale.test
index 9e793dffb..258eb5125 100644
--- a/modules/locale/locale.test
+++ b/modules/locale/locale.test
@@ -391,8 +391,9 @@ class LocaleTranslationFunctionalTest extends DrupalWebTestCase {
// This is the language indicator on the translation search screen for
// untranslated strings. Copied straight from locale.inc.
$language_indicator = "<em class=\"locale-untranslated\">$langcode</em> ";
- // This will be the translation of $name.
- $translation = $this->randomName(16);
+ // This will be the translation of $name. Make sure it contains at least
+ // one lower-case character in order to check case-sensitive search.
+ $translation = $this->randomName(16) . 'x';
// Add custom language.
$this->drupalLogin($admin_user);
@@ -469,6 +470,16 @@ class LocaleTranslationFunctionalTest extends DrupalWebTestCase {
$this->drupalPost('admin/international/translate/translate', $search, t('Filter'));
$this->assertNoText(t('No strings found for your search.'), t('Search found the translation.'));
+ // Ensure string search is case-sensitive.
+ $search = array(
+ 'string' => drupal_strtoupper($translation),
+ 'language' => 'all',
+ 'translation' => 'translated',
+ 'group' => 'all',
+ );
+ $this->drupalPost('admin/international/translate/translate', $search, t('Filter'));
+ $this->assertText(t('No strings found for your search.'), t("Search didn't find the translation."));
+
// Ensure translated source string doesn't appear if searching on 'only
// untranslated strings'.
$search = array(