#!/usr/bin/env php ', 'Opening element with no attributes' ); cmp_ok( Xml::element( 'element', null, '' ), '==', '', 'Terminated empty element' ); cmp_ok( Xml::element( 'element', null, 'hello you & you' ), '==', 'hello <there> you & you', 'Element with no attributes and content that needs escaping' ); cmp_ok( Xml::element( 'element', array( 'key' => 'value', '<>' => '<>' ), null ), '==', '="<>">', 'Element attributes, keys are not escaped' ); # # open/close element # cmp_ok( Xml::openElement( 'element', array( 'k' => 'v' ) ), '==', '', 'openElement() shortcut' ); cmp_ok( Xml::closeElement( 'element' ), '==', '', 'closeElement() shortcut' ); /* vim: set filetype=php: */