@@ -82,6 +82,17 @@ public function testExtraction(iterable|string $resource)
8282 'translatable-short ' .$ expectedNowdoc => 'prefixtranslatable-short ' .$ expectedNowdoc ,
8383 'translatable-short concatenated message with heredoc and nowdoc ' => 'prefixtranslatable-short concatenated message with heredoc and nowdoc ' ,
8484 'translatable-short default domain ' => 'prefixtranslatable-short default domain ' ,
85+ 'translatable-short-fqn single-quoted key ' => 'prefixtranslatable-short-fqn single-quoted key ' ,
86+ 'translatable-short-fqn double-quoted key ' => 'prefixtranslatable-short-fqn double-quoted key ' ,
87+ 'translatable-short-fqn heredoc key ' => 'prefixtranslatable-short-fqn heredoc key ' ,
88+ 'translatable-short-fqn nowdoc key ' => 'prefixtranslatable-short-fqn nowdoc key ' ,
89+ "translatable-short-fqn double-quoted key with whitespace and escaped \$\n\" sequences " => "prefixtranslatable-short-fqn double-quoted key with whitespace and escaped \$\n\" sequences " ,
90+ 'translatable-short-fqn single-quoted key with whitespace and nonescaped \$\n \' sequences ' => 'prefixtranslatable-short-fqn single-quoted key with whitespace and nonescaped \$\n \' sequences ' ,
91+ 'translatable-short-fqn single-quoted key with "quote mark at the end" ' => 'prefixtranslatable-short-fqn single-quoted key with "quote mark at the end" ' ,
92+ 'translatable-short-fqn ' .$ expectedHeredoc => 'prefixtranslatable-short-fqn ' .$ expectedHeredoc ,
93+ 'translatable-short-fqn ' .$ expectedNowdoc => 'prefixtranslatable-short-fqn ' .$ expectedNowdoc ,
94+ 'translatable-short-fqn concatenated message with heredoc and nowdoc ' => 'prefixtranslatable-short-fqn concatenated message with heredoc and nowdoc ' ,
95+ 'translatable-short-fqn default domain ' => 'prefixtranslatable-short-fqn default domain ' ,
8596 'single-quoted key ' => 'prefixsingle-quoted key ' ,
8697 'double-quoted key ' => 'prefixdouble-quoted key ' ,
8798 'heredoc key ' => 'prefixheredoc key ' ,
@@ -113,6 +124,11 @@ public function testExtraction(iterable|string $resource)
113124 'translatable-short other-domain-test-params-short-array ' => 'prefixtranslatable-short other-domain-test-params-short-array ' ,
114125 'translatable-short other-domain-test-params-long-array ' => 'prefixtranslatable-short other-domain-test-params-long-array ' ,
115126 'translatable-short typecast ' => 'prefixtranslatable-short typecast ' ,
127+ 'translatable-short-fqn other-domain-test-no-params-short-array ' => 'prefixtranslatable-short-fqn other-domain-test-no-params-short-array ' ,
128+ 'translatable-short-fqn other-domain-test-no-params-long-array ' => 'prefixtranslatable-short-fqn other-domain-test-no-params-long-array ' ,
129+ 'translatable-short-fqn other-domain-test-params-short-array ' => 'prefixtranslatable-short-fqn other-domain-test-params-short-array ' ,
130+ 'translatable-short-fqn other-domain-test-params-long-array ' => 'prefixtranslatable-short-fqn other-domain-test-params-long-array ' ,
131+ 'translatable-short-fqn typecast ' => 'prefixtranslatable-short-fqn typecast ' ,
116132 'other-domain-test-no-params-short-array ' => 'prefixother-domain-test-no-params-short-array ' ,
117133 'other-domain-test-no-params-long-array ' => 'prefixother-domain-test-no-params-long-array ' ,
118134 'other-domain-test-params-short-array ' => 'prefixother-domain-test-params-short-array ' ,
@@ -159,6 +175,10 @@ public function testExtraction(iterable|string $resource)
159175 $ this ->assertEquals (['sources ' => [$ filename .':2 ' ]], $ catalogue ->getMetadata ('translatable-short single-quoted key ' ));
160176 $ this ->assertEquals (['sources ' => [$ filename .':37 ' ]], $ catalogue ->getMetadata ('translatable-short other-domain-test-no-params-short-array ' , 'not_messages ' ));
161177
178+ $ filename = str_replace (\DIRECTORY_SEPARATOR , '/ ' , __DIR__ ).'/../Fixtures/extractor-ast/translatable-short-fqn.html.php ' ;
179+ $ this ->assertEquals (['sources ' => [$ filename .':2 ' ]], $ catalogue ->getMetadata ('translatable-short-fqn single-quoted key ' ));
180+ $ this ->assertEquals (['sources ' => [$ filename .':37 ' ]], $ catalogue ->getMetadata ('translatable-short-fqn other-domain-test-no-params-short-array ' , 'not_messages ' ));
181+
162182 $ filename = str_replace (\DIRECTORY_SEPARATOR , '/ ' , __DIR__ ).'/../Fixtures/extractor-ast/translation.html.php ' ;
163183 $ this ->assertEquals (['sources ' => [$ filename .':2 ' ]], $ catalogue ->getMetadata ('single-quoted key ' ));
164184 $ this ->assertEquals (['sources ' => [$ filename .':37 ' ]], $ catalogue ->getMetadata ('other-domain-test-no-params-short-array ' , 'not_messages ' ));
@@ -199,7 +219,7 @@ public static function resourcesProvider(): array
199219 if ($ fileInfo ->isDot ()) {
200220 continue ;
201221 }
202- if (\in_array ($ fileInfo ->getBasename (), ['translatable.html.php ' , 'translatable-fqn.html.php ' , 'translatable-short.html.php ' , 'translation.html.php ' , 'validator-constraints.php ' ], true )) {
222+ if (\in_array ($ fileInfo ->getBasename (), ['translatable.html.php ' , 'translatable-fqn.html.php ' , 'translatable-short.html.php ' , 'translatable-short-fqn.html.php ' , ' translation.html.php ' , 'validator-constraints.php ' ], true )) {
203223 $ phpFiles [] = $ fileInfo ->getPathname ();
204224 }
205225 $ splFiles [] = $ fileInfo ->getFileInfo ();
0 commit comments