public function testXmlToAssoc() { $xmlstr = <<<XML <?xml version="1.0" encoding="UTF-8" standalone="yes"?> <_><one>1</one><two><three>3</three><four>4</four></two></_> XML; $result = $this->_helper->xmlToAssoc(new SimpleXMLElement($xmlstr)); $this->assertEquals(array('one' => '1', 'two' => array('three' => '3', 'four' => '4')), $result); }