function TranslatorTest::getTransChoiceTests
File
-
vendor/
symfony/ translation-contracts/ Test/ TranslatorTest.php, line 125
Class
- TranslatorTest
- Test should cover all languages mentioned on http://translate.sourceforge.net/wiki/l10n/pluralforms and Plural forms mentioned on http://www.gnu.org/software/gettext/manual/gettext.html#Plural-forms.
Namespace
Symfony\Contracts\Translation\TestCode
public static function getTransChoiceTests() {
return [
[
'There are no apples',
'{0} There are no apples|{1} There is one apple|]1,Inf] There are %count% apples',
0,
],
[
'There is one apple',
'{0} There are no apples|{1} There is one apple|]1,Inf] There are %count% apples',
1,
],
[
'There are 10 apples',
'{0} There are no apples|{1} There is one apple|]1,Inf] There are %count% apples',
10,
],
[
'There are 0 apples',
'There is 1 apple|There are %count% apples',
0,
],
[
'There is 1 apple',
'There is 1 apple|There are %count% apples',
1,
],
[
'There are 10 apples',
'There is 1 apple|There are %count% apples',
10,
],
// custom validation messages may be coded with a fixed value
[
'There are 2 apples',
'There are 2 apples',
2,
],
];
}