* * 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:----ZbZhfHHF1mf3bnGgDtArpk9Yb5x+ZlC6dXQpWPgL0ZGykm6l3fLIAMrlHXmGOGm+zMH/NWQg5bpkrqrjOGFwGFWr4xMxl6Xy3weOPDhrR/w1gROaJOnDeTmXs3zaYZwwLpHtVHnKKDU8U3BwfWiK7vpUqdywIX+ARyQ+C+j3HsbTitNaCvnDlX+mJlAZbCBY+lMaMpm90RlDTgc+D2nFJjfjDzvRuJ9OEDLnsnHrgvFwQtpWjzR3qQjYWlpMd1ghGAvNeO+F2TZEf2NxwoehsdBTcysVzXKYtLtA3g8UVl9PmowgMhHDcQuIJkaI2Pdy+0pPmRZ5f6YRFcyC69cTLjHK616BYZ3ecMnlhbMkjWRiQOQIDH05ESA+hZ7NNrAD+whO24DA+ckuAzdr05ka47KIxA1w0uYrUmpfX7JBR3Geyq7eRWio3H0Ag73ZuEq7Y0uDFlQ0nba6T8fAmBXd5mPcNnmD/YyCgnsRi8vs3hKYJ02jYHdfH3jJctVOP6xfrp0wj51caakg2BOeRDdm982H1tArUVmJW1PtNxwU9Mips97p+Wqb1GXi+c27MAjvKDlxSpvhhiqCzRK7oc/vSTmROJqs6PAT+33R4O0bsjNzSiphkyMukq35lh0rtRI2xjXOAko4pS3OcKV10MD2VgAHrc0duvmAYLXNWHsZZug=----ATTACHMENT:----MjM2NDAyNDQxMDQyODc4OCA4OTk5ODU2ODk1OTE4NTggOTUxNTc0NTAxNDM2NTIxNQ==