8000 [Serializer][XmlEncoder] Allow removing empty tags in generated XML by amoiraud · Pull Request #20524 · symfony/symfony · GitHub
[go: up one dir, main page]

Skip to content

[Serializer][XmlEncoder] Allow removing empty tags in generated XML #20524

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Add test method for "remove_empty_tags" context option in XmlEncoder
  • Loading branch information
amoiraud committed Nov 15, 2016
commit 8f23c526ba96baa5c398f9f95653846d5b248a0b
Original file line number Diff line number Diff line change
Expand Up @@ -140,8 +140,7 @@ public function testEncodeXmlAttributes()

public function testEncodeRemovingEmptyTags()
{
$xml = simplexml_load_string('<firstname>Peter</firstname><lastname/>');
$array = array('person' => $xml);
$array = array('person' => array('firstname' => 'Peter', 'lastname' => null));

$expected = '<?xml version="1.0"?>'."\n".
'<response><person><firstname>Peter</firstname></person></response>'."\n";
Expand Down
0