public function testFromArray()
{
$e = new Horde_Xml_Element('<element />');
$e->fromArray(array('user' => 'Joe Schmoe', 'atom:title' => 'Test Title', 'child#href' => 'http://www.example.com/', '#title' => 'Test Element'));
$this->assertEquals('<element title="Test Element"><user>Joe Schmoe</user><atom:title xmlns:atom="http://www.w3.org/2005/Atom">Test Title</atom:title><child href="http://www.example.com/"/></element>', $e->saveXmlFragment());
$e = new Horde_Xml_Element('<element />');
$e->fromArray(array('author' => array('name' => 'Joe', 'email' => '*****@*****.**')));
$this->assertEquals('<element><author><name>Joe</name><email>[email protected]</email></author></element>', $e->saveXmlFragment());
}