@@ -15,17 +15,15 @@ class PreciseFormatterSpec extends ObjectBehavior
1515 function let (Translator $ translator )
1616 {
1717 $ this ->beConstructedWith ($ translator );
18- $ translator ->transChoice (
18+ $ translator ->trans (
1919 'compound.day ' ,
20- 10 ,
2120 array ('%count% ' => 10 ),
2221 'difference ' ,
2322 'en '
2423 )->willReturn ('10 days ' );
2524
26- $ translator ->transChoice (
25+ $ translator ->trans (
2726 'compound.hour ' ,
28- 5 ,
2927 array ('%count% ' => 5 ),
3028 'difference ' ,
3129 'en '
@@ -38,17 +36,15 @@ function let(Translator $translator)
3836 'en '
3937 )->willReturn ('10 days, 5 hours from now ' );
4038
41- $ translator ->transChoice (
39+ $ translator ->trans (
4240 'compound.day ' ,
43- 10 ,
4441 array ('%count% ' => 10 ),
4542 'difference ' ,
4643 'ru '
4744 )->willReturn ('10 дней ' );
4845
49- $ translator ->transChoice (
46+ $ translator ->trans (
5047 'compound.hour ' ,
51- 5 ,
5248 array ('%count% ' => 5 ),
5349 'difference ' ,
5450 'ru '
@@ -66,7 +62,7 @@ function it_format_compound_datetime_diff()
6662 {
6763 $ diff = new PreciseDifference (
6864 new \DateTime ("2015-01-01 00:00:00 " ),
69- new \DateTime ("2015-01-11 05:00:00 " )
65+ new \DateTime ("2015-01-11 05:00:00 " )
7066 );
7167
7268 $ this ->formatDifference ($ diff )->shouldReturn ('10 days, 5 hours from now ' );
@@ -78,7 +74,7 @@ function it_format_compound_datetime_diff_for_specific_locale()
7874 new \DateTime ("2015-01-01 00:00:00 " ),
7975 new \DateTime ("2015-01-11 05:00:00 " )
8076 );
81-
77+
8278 $ this ->formatDifference ($ diff , 'ru ' )->shouldReturn ('через 10 дней, 5 часов ' );
8379 }
8480}
0 commit comments