Skip to content

Commit 02b829f

Browse files
committed
[Translator] fix test for php 7 compatibility
1 parent 0b1f172 commit 02b829f

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -346,7 +346,7 @@ public function getTransTests()
346346
return array(
347347
array('Symfony est super !', 'Symfony is great!', 'Symfony est super !', array(), 'fr', ''),
348348
array('Symfony est awesome !', 'Symfony is %what%!', 'Symfony est %what% !', array('%what%' => 'awesome'), 'fr', ''),
349-
array('Symfony est super !', new String('Symfony is great!'), 'Symfony est super !', array(), 'fr', ''),
349+
array('Symfony est super !', new StringClass('Symfony is great!'), 'Symfony est super !', array(), 'fr', ''),
350350
);
351351
}
352352

@@ -392,7 +392,7 @@ public function getTransChoiceTests()
392392
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', ''),
393393
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', ''),
394394

395-
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', ''),
395+
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', ''),
396396
);
397397
}
398398

@@ -462,7 +462,7 @@ public function testTransChoiceFallbackWithNoTranslation()
462462
}
463463
}
464464

465-
class String
465+
class StringClass
466466
{
467467
protected $str;
468468

0 commit comments

Comments
 (0)