File tree Expand file tree Collapse file tree 1 file changed +6
-0
lines changed
Expand file tree Collapse file tree 1 file changed +6
-0
lines changed Original file line number Diff line number Diff line change @@ -34,9 +34,15 @@ function it_truncate_string_to_word_closest_to_a_certain_number_of_characters()
3434 $ this ->truncate ($ text , -2 )->shouldReturn ($ text );
3535
3636 $ textShort = 'Short text ' ;
37+ $ this ->truncate ($ textShort , 1 , '... ' )->shouldReturn ("Short... " );
38+ $ this ->truncate ($ textShort , 2 , '... ' )->shouldReturn ("Short... " );
39+ $ this ->truncate ($ textShort , 3 , '... ' )->shouldReturn ("Short... " );
3740 $ this ->truncate ($ textShort , 4 , '... ' )->shouldReturn ("Short... " );
3841 $ this ->truncate ($ textShort , 5 , '... ' )->shouldReturn ("Short... " );
3942 $ this ->truncate ($ textShort , 6 , '... ' )->shouldReturn ("Short... " );
4043 $ this ->truncate ($ textShort , 7 , '... ' )->shouldReturn ("Short text " );
44+ $ this ->truncate ($ textShort , 8 , '... ' )->shouldReturn ("Short text " );
45+ $ this ->truncate ($ textShort , 9 , '... ' )->shouldReturn ("Short text " );
46+ $ this ->truncate ($ textShort , 10 , '... ' )->shouldReturn ("Short text " );
4147 }
4248}
You can’t perform that action at this time.
0 commit comments