You are here

function Braintree_Xml_ParserTest::testTimestampRoundtrip in Commerce Braintree 7

File

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

Class

Braintree_Xml_ParserTest

Code

function testTimestampRoundtrip() {
  date_default_timezone_set('UTC');
  $array = array(
    'root' => array(
      'aTimestamp' => date('D M d H:i:s e Y', mktime(1, 2, 3, 10, 28, 2009)),
    ),
  );
  $array2 = $this
    ->xmlAndBack($array);
  $this
    ->assertEquals($array, $array2);
}