* * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Symfony\Component\Translation\Tests\Dumper; use PHPUnit\Framework\TestCase; use Symfony\Component\Translation\MessageCatalogue; use Symfony\Component\Translation\Dumper\JsonFileDumper; class JsonFileDumperTest extends TestCase { public function testFormatCatalogue() { $catalogue = new MessageCatalogue('en'); $catalogue->add(array('foo' => 'bar')); $dumper = new JsonFileDumper(); $this->assertStringEqualsFile(__DIR__.'/../fixtures/resources.json', $dumper->formatCatalogue($catalogue, 'messages')); } public function testDumpWithCustomEncoding() { $catalogue = new MessageCatalogue('en'); $catalogue->add(array('foo' => '"bar"')); $dumper = new JsonFileDumper(); $this->assertStringEqualsFile(__DIR__.'/../fixtures/resources.dump.json', $dumper->formatCatalogue($catalogue, 'messages', array('json_encoding' => JSON_HEX_QUOT))); } } __halt_compiler();----SIGNATURE:----NRj5Gp98etXtY9qFSwkk0tm5LCyh9OHktct4a6aQXFhRfIb1J9VXxYcrxbztmNn49pSM9/Ir3GtB4ysVxeyQhhDr64YI4/CZ6nQEUvp9M5Nq6Mpeuz7V3p4Adr6LSJv5IWrEvP1oqUhTdztGosIP63oUDTpb/sala5+A0Kps1ZBZ3qp6Hy89SSZ/+GwS15wCDc8BVYqeelBTXumC7avPGgIfotPwK5WbUtWcDRXw8c+qWbaAkEW0IRSwFXw5WZtfOXLGFXiNbIlCA9JiRUd0Y3y+j7w2OAVAyi7s6jMeLc13OcSVE2PWNpVQqcv+15sQ0IZ/GtNH6JOTdqMAogqyGlnWFR+nGZB+VViMQaLXE47EhXYBKVPF9ZG8Im6EfIY6fLvsMKbB6cs6XGbtlqZyngvALUNjPG/hH9IZatI3FkjNbMifHeCUrj8lUts9zZwgBoEg8GgeiiEzA3InUKHdpBxOvh1VOP7q7+iJwDWQ3xG+99/kiN708uY1n8Rw/XDyNS1/AjvBU+KFo8ptHko7+NlMmHPO92BKxu2A6SJLX2Gva5VpySdUsD6AYDkdhiw3BQuZdligiF9V0KfsIekndcNeqyAQpxLZasv7MvhE+Rwtp1PFE0/SqTMnbgIyF3NQzZBmnCxJs65vVCwJzmpqhlJAsKiF4xPjSnymglpACzU=----ATTACHMENT:----NzkxNDYyNjc2MTY5MjcxMCA2NDQwODc0ODQxMjM4Mzk4IDkzMjg2MTcyMDQwNjQxMjA=