You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/Symfony/Component/Translation/Tests/MessageSelectorTest.php
+32Lines changed: 32 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -93,6 +93,38 @@ public function getChooseTests()
93
93
array('There are no apples', '{0} There are no apples|]0,1[There are %count% apples|{1} There is one apple|[1,Inf] There is more than one apple', 0),
94
94
array('There are no apples', '{0} There are no apples|]0,1[There are %count% apples|{1} There is one apple|[1,Inf] There is more than one apple', 0.0),
95
95
array('There are no apples', '{0.0} There are no apples|]0,1[There are %count% apples|{1} There is one apple|[1,Inf] There is more than one apple', 0),
96
+
97
+
// Test texts with new-lines
98
+
// with double-quotes and \n in id & double-quotes and actual newlines in text
99
+
array("This is a text with a\n new-line in it. Selector = 0.", '{0}This is a text with a
100
+
new-line in it. Selector = 0.|{1}This is a text with a
101
+
new-line in it. Selector = 1.|[1,Inf]This is a text with a
102
+
new-line in it. Selector > 1.', 0),
103
+
// with double-quotes and \n in id and single-quotes and actual newlines in text
104
+
array("This is a text with a\n new-line in it. Selector = 1.", '{0}This is a text with a
105
+
new-line in it. Selector = 0.|{1}This is a text with a
106
+
new-line in it. Selector = 1.|[1,Inf]This is a text with a
107
+
new-line in it. Selector > 1.', 1),
108
+
array("This is a text with a\n new-line in it. Selector > 1.", '{0}This is a text with a
109
+
new-line in it. Selector = 0.|{1}This is a text with a
110
+
new-line in it. Selector = 1.|[1,Inf]This is a text with a
111
+
new-line in it. Selector > 1.', 5),
112
+
// with double-quotes and id split accros lines
113
+
array('This is a text with a
114
+
new-line in it. Selector = 1.', '{0}This is a text with a
115
+
new-line in it. Selector = 0.|{1}This is a text with a
116
+
new-line in it. Selector = 1.|[1,Inf]This is a text with a
117
+
new-line in it. Selector > 1.', 1),
118
+
// with single-quotes and id split accros lines
119
+
array('This is a text with a
120
+
new-line in it. Selector > 1.', '{0}This is a text with a
121
+
new-line in it. Selector = 0.|{1}This is a text with a
122
+
new-line in it. Selector = 1.|[1,Inf]This is a text with a
123
+
new-line in it. Selector > 1.', 5),
124
+
// with single-quotes and \n in text
125
+
array('This is a text with a\nnew-line in it. Selector = 0.', '{0}This is a text with a\nnew-line in it. Selector = 0.|{1}This is a text with a\nnew-line in it. Selector = 1.|[1,Inf]This is a text with a\nnew-line in it. Selector > 1.', 0),
126
+
// with double-quotes and id split accros lines
127
+
array("This is a text with a\nnew-line in it. Selector = 1.", "{0}This is a text with a\nnew-line in it. Selector = 0.|{1}This is a text with a\nnew-line in it. Selector = 1.|[1,Inf]This is a text with a\nnew-line in it. Selector > 1.", 1),
0 commit comments