minor #14087 [Translator] fix test for php 7 compatibility (Tobion)
This PR was merged into the 2.3 branch.
Discussion
----------
[Translator] fix test for php 7 compatibility
| Q | A
| ------------- | ---
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #14086 for Translation component
| License | MIT
| Doc PR | -
Commits
-------
02b829f
[Translator] fix test for php 7 compatibility
This commit is contained in:
commit
32dc1cdd5f
@ -346,7 +346,7 @@ class TranslatorTest extends \PHPUnit_Framework_TestCase
|
|||||||
return array(
|
return array(
|
||||||
array('Symfony est super !', 'Symfony is great!', 'Symfony est super !', array(), 'fr', ''),
|
array('Symfony est super !', 'Symfony is great!', 'Symfony est super !', array(), 'fr', ''),
|
||||||
array('Symfony est awesome !', 'Symfony is %what%!', 'Symfony est %what% !', array('%what%' => 'awesome'), 'fr', ''),
|
array('Symfony est awesome !', 'Symfony is %what%!', 'Symfony est %what% !', array('%what%' => 'awesome'), 'fr', ''),
|
||||||
array('Symfony est super !', new String('Symfony is great!'), 'Symfony est super !', array(), 'fr', ''),
|
array('Symfony est super !', new StringClass('Symfony is great!'), 'Symfony est super !', array(), 'fr', ''),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -392,7 +392,7 @@ class TranslatorTest extends \PHPUnit_Framework_TestCase
|
|||||||
array('Il y a 1 pomme', '{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', 1, array('%count%' => 1), 'fr', ''),
|
array('Il y a 1 pomme', '{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', 1, array('%count%' => 1), 'fr', ''),
|
||||||
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('%count%' => 10), 'fr', ''),
|
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('%count%' => 10), 'fr', ''),
|
||||||
|
|
||||||
array('Il y a 0 pomme', new String('{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('%count%' => 0), 'fr', ''),
|
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('%count%' => 0), 'fr', ''),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -462,7 +462,7 @@ class TranslatorTest extends \PHPUnit_Framework_TestCase
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
class String
|
class StringClass
|
||||||
{
|
{
|
||||||
protected $str;
|
protected $str;
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user