diff --git a/modules/locale/locale.test b/modules/locale/locale.test index de7c487..939616d 100644 --- a/modules/locale/locale.test +++ b/modules/locale/locale.test @@ -745,15 +745,18 @@ class LocalePluralFormatTest extends DrupalWebTestCase { * @param $message */ function assertPluralFormat($count, $lang, $expected_result) { - $message = t("Computed plural index for '@lang' with count @count is @expected_result.", - array( - '@lang' => $lang, - '@count' => $count, - '@expected_result' => $expected_result - )); - $this->assertText(format_string('Language: @lang, locale_get_plural: @expected_result.', - array('@lang' => $lang, '@expected_result' => $expected_result)), - $message); + $message_param = array( + '@lang' => $lang, + '@count' => $count, + '@expected_result' => $expected_result, + ); + $message = t("Computed plural index for '@lang' with count @count is @expected_result.", $message_param); + + $message_param = array( + '@lang' => $lang, + '@expected_result' => $expected_result, + ); + $this->assertText(format_string('Language: @lang, locale_get_plural: @expected_result.', $message_param, $message)); } /** @@ -2907,3 +2910,4 @@ class LocaleLanguageNegotiationInfoFunctionalTest extends DrupalWebTestCase { } } } + diff --git a/modules/locale/tests/locale_test.module b/modules/locale/tests/locale_test.module index 374f386..64f4aed 100644 --- a/modules/locale/tests/locale_test.module +++ b/modules/locale/tests/locale_test.module @@ -142,12 +142,13 @@ function locale_test_plural_format_page() { $tests = _locale_test_plural_format_tests(); $result = array(); foreach ($tests as $test) { + $string_param = array( + '@lang' => $test['language'], + '@locale_get_plural' => locale_get_plural($test['count'], $test['language']) + ); $result[] = array( '#prefix' => '
', - '#markup' => format_string('Language: @lang, locale_get_plural: @locale_get_plural.', - array( - '@lang' => $test['language'], - '@locale_get_plural' => locale_get_plural($test['count'], $test['language']))), + '#markup' => format_string('Language: @lang, locale_get_plural: @locale_get_plural.', $string_param), ); } return $result; @@ -238,4 +239,4 @@ function _locale_test_plural_format_tests() { 'expected-result' => -1, ), ); -} \ No newline at end of file +}