From e8df1cd6911b8f5a75e67a731fcb44b36581b8b4 Mon Sep 17 00:00:00 2001 From: Angie Byron Date: Wed, 28 Apr 2010 05:12:43 +0000 Subject: #654726 by bdurbin, sun, plach, et al: Fixed Installing Drupal 7 in non-English language doesn't pick up st() installation lists. --- modules/locale/locale.test | 38 ++++++++++++++++++++++++++++++++++---- 1 file changed, 34 insertions(+), 4 deletions(-) (limited to 'modules') diff --git a/modules/locale/locale.test b/modules/locale/locale.test index a2add4610..6f82b9e3e 100644 --- a/modules/locale/locale.test +++ b/modules/locale/locale.test @@ -957,6 +957,35 @@ EOF; } +/** + * Tests for the st() function. + */ +class LocaleInstallTest extends DrupalWebTestCase { + public static function getInfo() { + return array( + 'name' => 'String translation using st()', + 'description' => 'Tests that st() works like t().', + 'group' => 'Locale', + ); + } + + function setUp() { + parent::setUp('locale'); + + // st() lives in install.inc, so ensure that it is loaded for all tests. + require_once DRUPAL_ROOT . '/includes/install.inc'; + } + + /** + * Verify that function signatures of t() and st() are equal. + */ + function testFunctionSignatures() { + $reflector_t = new ReflectionFunction('t'); + $reflector_st = new ReflectionFunction('st'); + $this->assertEqual($reflector_t->getParameters(), $reflector_st->getParameters(), t('Function signatures of t() and st() are equal.')); + } +} + /** * Locale uninstall with English UI functional test. */ @@ -1106,7 +1135,7 @@ class LocaleUninstallFrenchFunctionalTest extends LocaleUninstallFunctionalTest /** * Functional tests for the language switching feature. */ -class LanguageSwitchingFunctionalTest extends DrupalWebTestCase { +class LocaleLanguageSwitchingFunctionalTest extends DrupalWebTestCase { public static function getInfo() { return array( @@ -1280,7 +1309,7 @@ class LocaleUserLanguageFunctionalTest extends DrupalWebTestCase { /** * Functional test for language handling during user creation. */ -class LocalUserCreationTest extends DrupalWebTestCase { +class LocaleUserCreationTest extends DrupalWebTestCase { public static function getInfo() { return array( @@ -1606,7 +1635,7 @@ class LocaleContentFunctionalTest extends DrupalWebTestCase { * http://example.cn/admin/config * UI language in Chinese */ -class UILanguageNegotiationTest extends DrupalWebTestCase { +class LocaleUILanguageNegotiationTest extends DrupalWebTestCase { public static function getInfo() { return array( 'name' => 'UI language negotiation', @@ -1904,7 +1933,7 @@ class LocaleMultilingualFieldsFunctionalTest extends DrupalWebTestCase { /** * Functional tests for localizing date formats. */ -class LocalizeDateFormatsFunctionalTest extends DrupalWebTestCase { +class LocaleDateFormatsFunctionalTest extends DrupalWebTestCase { public static function getInfo() { return array( @@ -1969,3 +1998,4 @@ class LocalizeDateFormatsFunctionalTest extends DrupalWebTestCase { $this->assertText($french_date, t('French date format appears')); } } + -- cgit v1.2.3