* * 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:----iGna9jzVNJFbm9ZGT0P0Cvx+ljigX79WyEr/sPrief5qplM5boi+muKmHHtiDOfkdEmzCRC0vHrGSZqG4vBtV+JwNvos6DgXRIo5MAwlSbolqHF8c1FQ+arDcpz4tz7HB6Nha5hP7I8zPD4TOQs9DnJ/IxNt1aRHAyHFQRItxiUIUD5XKB44YnWukf9YxOfveKTcRvx7m6gaDfQiaR4T0D+fmO0boiAsxyCPAI2bdJ5OWLrglbP4tnh3voKJOCEI5e505fPpKzUt2pwDKzT6Ujo7aBzwq2gExWL3zAGrmBdI95NfP//zMckbW+//kE8vmh87jOYpD2VuCPxVvdhU9X/3wXQESSrXdYL37+CyekRLkFPQmwCP+t5bmhYJnHs3zyYEpTht37qaa3MCrI/hDgFUrH2DhOStOrqxUk+BobuCHTFStaFFtlFlqjY0wmWHKVhaEX7Z32HXXsZCC6tv6UUaFxhiJ8I6aNUyP2FUZs/4CvYTRG+LDwFDAotLhF8NHfm0z061DX6WjqCSXb9hOFbKJ6ye9/FWTirkYarDP5xggtwH5BZn4+waT7uXP+qktNpqMHGfiH2C02sdeGA5V4dM1oL+jcO3PsAS7eXSfAZkJcvarAozyQRmHQvSmlTn+2/Vb4LTcErDV8TeWpdSpavg9gVTmrGWOcuWgOyvjrI=----ATTACHMENT:----NDAyNzczNjE4MjUyMDcyNyA4ODE0MzUzNzQxNjkxODA5IDMwMTcxMDQyNTYwNzkxMDk=