Closed
Description
Hey.
I'v been making some translations gui bundle and found a bug in PhpExtractor:
Every message that found by PhpExtractor is with "messages" domain.
So, for unit tests i did:
added line to FrameworkBundle/Tests/Fixtures/Views/translation.html.php
<?php echo $view['translator']->trans( 'other-domain-test', [], 'not_messages' ); ?>
and modified tests file ( FrameworkBundle/Tests/Translation/PhpExtractorTest.php )
// Assert
$expectedCatalogue = array('messages' => array(
'single-quoted key' => 'prefixsingle-quoted key',
'double-quoted key' => 'prefixdouble-quoted key',
'heredoc key' => 'prefixheredoc key',
'nowdoc key' => 'prefixnowdoc key',
"double-quoted key with whitespace and escaped \$\n\" sequences" => "prefixdouble-quoted key with whitespace and escaped \$\n\" sequences",
'single-quoted key with whitespace and nonescaped \$\n\' sequences' => 'prefixsingle-quoted key with whitespace and nonescaped \$\n\' sequences',
'single-quoted key with "quote mark at the end"' => 'prefixsingle-quoted key with "quote mark at the end"',
$expectedHeredoc => 'prefix'.$expectedHeredoc,
$expectedNowdoc => 'prefix'.$expectedNowdoc,
'{0} There is no apples|{1} There is one apple|]1,Inf[ There are %count% apples' => 'prefix{0} There is no apples|{1} There is one apple|]1,Inf[ There are %count% apples',
), 'not_messages' => array(
'other-domain-test' => 'prefixother-domain-test'
) );
added 'not_messages' key and values array
And it fails!