Skip to content

Commit

Permalink
Fixes XliffFileDumperTest for 6.4
Browse files Browse the repository at this point in the history
  • Loading branch information
Hanmac authored and nicolas-grekas committed Feb 13, 2025
1 parent b867b35 commit 3b9bf9f
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 20 deletions.
18 changes: 0 additions & 18 deletions Tests/Dumper/XliffFileDumperTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -148,24 +148,6 @@ public function testDumpCatalogueWithXliffExtension()
);
}

public function testFormatCatalogueXliff2WithSegmentAttributes()
{
$catalogue = new MessageCatalogue('en_US');
$catalogue->add([
'foo' => 'bar',
'key' => '',
]);
$catalogue->setMetadata('foo', ['segment-attributes' => ['state' => 'translated']]);
$catalogue->setMetadata('key', ['segment-attributes' => ['state' => 'translated', 'subState' => 'My Value']]);

$dumper = new XliffFileDumper();

$this->assertStringEqualsFile(
__DIR__.'/../Fixtures/resources-2.0-segment-attributes.xlf',
$dumper->formatCatalogue($catalogue, 'messages', ['default_locale' => 'fr_FR', 'xliff_version' => '2.0'])
);
}

public function testEmptyMetadataNotes()
{
$catalogue = new MessageCatalogue('en_US');
Expand Down
4 changes: 2 additions & 2 deletions Tests/Fixtures/resources-2.0-empty-notes.xlf
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
<?xml version="1.0" encoding="utf-8"?>
<xliff xmlns="urn:oasis:names:tc:xliff:document:2.0" version="2.0" srcLang="fr-FR" trgLang="en-US">
<file id="messages.en_US">
<unit id="Ll7LrI6" name="empty">
<unit id="Lhz6grA" name="empty">
<segment>
<source>empty</source>
<target>notes</target>
</segment>
</unit>
<unit id="hU8PAYC" name="full">
<unit id="oYuGmy6" name="full">
<notes>
<note category="file-source" priority="1">test/path/to/translation/Example.1.html.twig:27</note>
</notes>
Expand Down

0 comments on commit 3b9bf9f

Please sign in to comment.