namespace Symfony\Component\Translation\Tests;
use PHPUnit\Framework\TestCase;
use Symfony\Component\Translation\DataCollectorTranslator;
use Symfony\Component\Translation\Loader\ArrayLoader;
use Symfony\Component\Translation\Translator;
class DataCollectorTranslatorTest extends TestCase
{ public function testCollectMessages() { $collector =
$this->
createCollector();
$collector->
setFallbackLocales(['fr', 'ru'
]);
$collector->
trans('foo'
);
$collector->
trans('bar'
);
$collector->
trans('choice',
['%count%' => 0
]);
$collector->
trans('bar_ru'
);
$collector->
trans('bar_ru',
['foo' => 'bar'
]);
$expectedMessages =
[];
$expectedMessages[] =
[ 'id' => 'foo',