@@ -288,7 +288,7 @@ public function testPhpCode2()
288288 {
289289 $ translations = static ::get ('phpcode2/input ' , 'PhpCode ' , [
290290 'constants ' => [
291- 'CONTEXT ' => 'my-context '
291+ 'CONTEXT ' => 'my-context ' ,
292292 ]
293293 ]);
294294 $ countTranslations = 9 ;
@@ -323,6 +323,44 @@ public function testPhpCode2()
323323 $ this ->runTestFormat ('phpcode2/YamlDictionary ' , $ countTranslations );
324324 }
325325
326+ public function testPhpCode3 ()
327+ {
328+ $ translations = static ::get ('phpcode3/input ' , 'PhpCode ' , [
329+ 'extractComments ' => ['allowed1 ' , 'allowed2 ' ],
330+ ]);
331+ $ countTranslations = 1 ;
332+ $ countHeaders = 8 ;
333+
334+ $ this ->assertCount ($ countTranslations , $ translations );
335+ $ this ->assertCount ($ countHeaders , $ translations ->getHeaders ());
336+ $ this ->assertEquals (0 , $ translations ->countTranslated ());
337+
338+ self ::saveContent ($ translations , 'phpcode3/Po ' );
339+ $ this ->assertContent ($ translations , 'phpcode3/Po ' );
340+ $ this ->assertContent ($ translations , 'phpcode3/Mo ' );
341+ $ this ->assertContent ($ translations , 'phpcode3/PhpArray ' );
342+ $ this ->assertContent ($ translations , 'phpcode3/Jed ' );
343+ $ this ->assertContent ($ translations , 'phpcode3/Json ' );
344+ $ this ->assertContent ($ translations , 'phpcode3/JsonDictionary ' );
345+ $ this ->assertContent ($ translations , 'phpcode3/Csv ' );
346+ $ this ->assertContent ($ translations , 'phpcode3/CsvDictionary ' );
347+ $ this ->assertContent ($ translations , 'phpcode3/Xliff ' );
348+ $ this ->assertContent ($ translations , 'phpcode3/Yaml ' );
349+ $ this ->assertContent ($ translations , 'phpcode3/YamlDictionary ' );
350+
351+ $ this ->runTestFormat ('phpcode3/Po ' , $ countTranslations , $ countHeaders );
352+ $ this ->runTestFormat ('phpcode3/Mo ' , 0 , $ countHeaders );
353+ $ this ->runTestFormat ('phpcode3/PhpArray ' , $ countTranslations , $ countHeaders );
354+ $ this ->runTestFormat ('phpcode3/Jed ' , $ countTranslations , 10 );
355+ $ this ->runTestFormat ('phpcode3/Xliff ' , $ countTranslations , $ countHeaders );
356+ $ this ->runTestFormat ('phpcode3/Json ' , $ countTranslations , $ countHeaders );
357+ $ this ->runTestFormat ('phpcode3/JsonDictionary ' , $ countTranslations );
358+ $ this ->runTestFormat ('phpcode3/Csv ' , $ countTranslations , $ countHeaders );
359+ $ this ->runTestFormat ('phpcode3/CsvDictionary ' , $ countTranslations );
360+ $ this ->runTestFormat ('phpcode3/Yaml ' , $ countTranslations , $ countHeaders );
361+ $ this ->runTestFormat ('phpcode3/YamlDictionary ' , $ countTranslations );
362+ }
363+
326364 public function testTwig ()
327365 {
328366 $ translations = static ::get ('twig/input ' , 'Twig ' );
0 commit comments