8000 Add test to check that %count% placeholder is overwritable with a cus… · symfony/symfony@d133bef · GitHub
[go: up one dir, main page]

Skip to content

Commit d133bef

Browse files
committed
Add test to check that %count% placeholder is overwritable with a custom value
1 parent ec2caca commit d133bef

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/Symfony/Component/Translation/Tests/TranslatorTest.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -448,6 +448,9 @@ public function getTransChoiceTests()
448448
array('Il y a 10 pommes', '{0} There are no apples|one: There is one apple|more: There is %count% apples', '{0} Il n\'y a aucune pomme|one: Il y a %count% pomme|more: Il y a %count% pommes', 10, array(), 'fr', ''),
449449

450450
array('Il y a 0 pomme', new StringClass('{0} There are no appless|{1} There is one apple|]1,Inf] There is %count% apples'), '[0,1] Il y a %count% pomme|]1,Inf] Il y a %count% pommes', 0, array(), 'fr', ''),
451+
452+
// Override %count% with a custom value
453+
array('Il y a quelques pommes', 'one: There is one apple|more: There are %count% apples', 'one: Il y a %count% pomme|more: Il y a %count% pommes', 2, array('%count%' => 'quelques'), 'fr', ''),
451454
);
452455
}
453456

0 commit comments

Comments
 (0)
0