function Braintree_Xml_ParserTest::testNullvsEmptyStringToXml in Commerce Braintree 7
File
- braintree_php/
tests/ unit/ Xml_ParserTest.php, line 483
Class
Code
function testNullvsEmptyStringToXml() {
$array = array(
'root' => array(
'anEmptyString' => '',
'aNullValue' => null,
),
);
$xml = Braintree_Xml::buildXmlFromArray($array);
$xml2 = <<<XML
<?xml version="1.0" encoding="UTF-8"?>
<root>
<an-empty-string></an-empty-string>
<a-null-value nil="true"></a-null-value>
</root>
XML;
$this
->assertEquals($xml, $xml2);
}