@@ -108,16 +108,33 @@ public function testLintMalformedIcuTranslations()
108
108
fr messages No
109
109
-------- ---------- --------
110
110
EOF , $ display );
111
- $ this ->assertStringContainsString (<<<EOF
111
+ $ this ->assertStringContainsString (\sprintf ( <<<EOF
112
112
Errors for locale "en" and domain "messages"
113
113
--------------------------------------------
114
114
115
115
Translation key "num_of_apples" is invalid:
116
116
117
- [ERROR] Invalid message format (error #65807): msgfmt_create: message formatter creation failed:
117
+ [ERROR] Invalid message format (error #65807): %s: message formatter creation failed:
118
+ U_DEFAULT_KEYWORD_MISSING
119
+ EOF , \PHP_VERSION_ID >= 80500 ? 'MessageFormatter::__construct() ' : 'msgfmt_create ' ), $ display );
120
+
121
+ if (\PHP_VERSION_ID >= 80500 ) {
122
+ $ this ->assertStringContainsString (<<<EOF
123
+ Errors for locale "fr" and domain "messages"
124
+ --------------------------------------------
125
+
126
+ Translation key "hello_name" is invalid:
127
+
128
+ [ERROR] Invalid message format (error #65799): MessageFormatter::__construct(): pattern syntax error (parse error at
129
+ offset 9, after "Bonjour {", before or at "name !"): U_PATTERN_SYNTAX_ERROR
130
+
131
+ Translation key "num_of_apples" is invalid:
132
+
133
+ [ERROR] Invalid message format (error #65807): MessageFormatter::__construct(): message formatter creation failed:
118
134
U_DEFAULT_KEYWORD_MISSING
119
135
EOF , $ display );
120
- $ this ->assertStringContainsString (<<<EOF
136
+ } else {
137
+ $ this ->assertStringContainsString (<<<EOF
121
138
Errors for locale "fr" and domain "messages"
122
139
--------------------------------------------
123
140
@@ -131,6 +148,7 @@ public function testLintMalformedIcuTranslations()
131
148
[ERROR] Invalid message format (error #65807): msgfmt_create: message formatter creation failed:
132
149
U_DEFAULT_KEYWORD_MISSING
133
150
EOF , $ display );
151
+ }
134
152
}
135
153
136
154
private function createCommand (Translator $ translator , array $ enabledLocales ): Command
0 commit comments