function test_xmpp_stanza_nested()
{
$stanza = new JAXLXml('message', array('to' => '[email protected]', 'from' => '[email protected]'));
$stanza->c('body')->attrs(array('xml:lang' => 'en'))->t('hello')->up()->c('thread')->t('1234')->up()->c('nested')->c('nest')->t('nest1')->up()->c('nest')->t('nest2')->up()->c('nest')->t('nest3')->up()->up()->c('c')->attrs(array('hash' => '84jsdmnskd'));
$this->assertEquals('<message to="[email protected]" from="[email protected]"><body xml:lang="en">hello</body><thread>1234</thread><nested><nest>nest1</nest><nest>nest2</nest><nest>nest3</nest></nested><c hash="84jsdmnskd"></c></message>', $stanza->to_string());
}