function Braintree_Xml_GeneratorTest::testCreatesArraysWithBooleans in Commerce Braintree 7
File
- braintree_php/
tests/ unit/ Xml_GeneratorTest.php, line 40
Class
Code
function testCreatesArraysWithBooleans() {
$expected = <<<XML
<?xml version="1.0" encoding="UTF-8"?>
<root>
<stuff type="array">
<item>true</item>
<item>false</item>
</stuff>
</root>
XML;
$xml = Braintree_Xml::buildXmlFromArray(array(
'root' => array(
'stuff' => array(
true,
false,
),
),
));
$this
->assertEquals($expected, $xml);
}