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