|
17 | 17 | use Symfony\Component\Translation\Exception\RuntimeException; |
18 | 18 | use Symfony\Component\Translation\Loader\ArrayLoader; |
19 | 19 | use Symfony\Component\Translation\MessageCatalogue; |
| 20 | +use Symfony\Component\Translation\TranslatableMessage; |
20 | 21 | use Symfony\Component\Translation\Translator; |
21 | 22 |
|
22 | 23 | class TranslatorTest extends TestCase |
@@ -467,11 +468,14 @@ public function getTransFileTests() |
467 | 468 | ]; |
468 | 469 | } |
469 | 470 |
|
470 | | - public function getTransTests() |
| 471 | + public function getTransTests(): iterable |
471 | 472 | { |
| 473 | + $param = new TranslatableMessage('Symfony is %what%!', ['%what%' => 'awesome'], ''); |
| 474 | + |
472 | 475 | return [ |
473 | 476 | ['Symfony est super !', 'Symfony is great!', 'Symfony est super !', [], 'fr', ''], |
474 | 477 | ['Symfony est awesome !', 'Symfony is %what%!', 'Symfony est %what% !', ['%what%' => 'awesome'], 'fr', ''], |
| 478 | + ['Symfony est Symfony est awesome ! !', 'Symfony is %what%!', 'Symfony est %what% !', ['%what%' => $param], 'fr', ''], |
475 | 479 | ['Symfony est super !', new StringClass('Symfony is great!'), 'Symfony est super !', [], 'fr', ''], |
476 | 480 | ['', null, '', [], 'fr', ''], |
477 | 481 | ]; |
|
0 commit comments