diff options
Diffstat (limited to 'tests/it_xml.t')
-rwxr-xr-x | tests/it_xml.t | 18 |
1 files changed, 13 insertions, 5 deletions
diff --git a/tests/it_xml.t b/tests/it_xml.t index d805d8d..f74c54b 100755 --- a/tests/it_xml.t +++ b/tests/it_xml.t @@ -64,7 +64,7 @@ match( match( '<foo>&amp; <a> &amp; <b> &amp; <c> ü</foo>', 'foo Object ( [val] => & <a> & <b> & <c> ü ) ', - 'Predecode illegal entities while keeping properly encoded ones', + 'Predecode illegal entities while keeping properly encoded ones' ); match( @@ -72,10 +72,18 @@ match( utf8_encode('foo Object ( [val] => & <a> & <b> & <c> ü ) '), 'Predecode illegal entities while keeping properly encoded ones (UTF-8)', "", - array('encoding' => "UTF-8"), + array('encoding' => "UTF-8") ); +match( + "<foo>a\x05b</foo>", + 'foo Object ( [val] => a b ) ', + 'Illegal latin 1 character', + "", + array('encoding' => "ISO-8859-1") +); + # Test inheritance class my_xml extends it_xml { @@ -101,12 +109,12 @@ match( 'my' ); -$x = new foo("<foo></foo>", 'prefix' => "test"); -$x->set('gna' => 42, 'bar' => array('baz' => array("qux", "quux"))); +$x = new foo("<foo></foo>", array('prefix' => "test")); +$x->set(array('gna' => 42, 'bar' => array('baz' => array("qux", "quux")))); match( $x->to_xml(), 'foo Object ( [gna] => gna Object ( [val] => 42 ) [bar] => bar Object ( [baz] => Array ( [0] => baz Object ( [val] => qux ) [1] => baz Object ( [val] => quux ) ) ) ) ', - "Method set()", + "Method set()" ); ?> |