$dumper->formatCatalogue($catalogue, 'messages', array('default_locale' => 'fr_FR'))
);
}
+
+ public function testFormatCatalogueWithNotesMetadata()
+ {
+ $catalogue = new MessageCatalogue('en_US');
+ $catalogue->add(array(
+ 'foo' => 'bar',
+ 'baz' => 'biz',
+ ));
+ $catalogue->setMetadata('foo', array('notes' => array(
+ array('category' => 'state', 'content' => 'new'),
+ array('category' => 'approved', 'content' => 'true'),
+ array('category' => 'section', 'content' => 'user login', 'priority' => '1'),
+ )));
+ $catalogue->setMetadata('baz', array('notes' => array(
+ array('id' => 'x', 'content' => 'x_content'),
+ array('appliesTo' => 'target', 'category' => 'quality', 'content' => 'Fuzzy'),
+ )));
+
+ $dumper = new XliffFileDumper();
+
+ $this->assertStringEqualsFile(
+ __DIR__.'/../fixtures/resources-notes-meta.xlf',
+ $dumper->formatCatalogue($catalogue, 'messages', array('default_locale' => 'fr_FR', 'xliff_version' => '2.0'))
+ );
+ }
}