You are here

function Braintree_Xml_ParserTest::testNullOrEmptyString in Commerce Braintree 7

File

braintree_php/tests/unit/Xml_ParserTest.php, line 28

Class

Braintree_Xml_ParserTest

Code

function testNullOrEmptyString() {
  $xml = <<<XML
        <root>
          <a_nil_value nil="true"></a_nil_value>
          <an_empty_string></an_empty_string>
        </root>
XML;
  $array = Braintree_Xml::buildArrayFromXml($xml);
  $this
    ->assertEquals(array(
    'root' => array(
      'aNilValue' => null,
      'anEmptyString' => '',
    ),
  ), $array);
}