diff options
Diffstat (limited to 'test/it_xml.t')
-rwxr-xr-x | test/it_xml.t | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/test/it_xml.t b/test/it_xml.t index 84f258f..27f910f 100755 --- a/test/it_xml.t +++ b/test/it_xml.t @@ -3,7 +3,7 @@ # Tests for xml.class -function match($xmldata, $expected, $name, $prefix = "", $p = array()) +function match($xmldata, $expected, $name, $prefix = "", $p = []) { $classname = ($prefix ?: "it") . "_xml"; $varname = $prefix . "foo"; @@ -66,7 +66,7 @@ match( utf8_decode('foo Object ( [val] => x ü y ) '), 'Manual encoding override', "", - array('encoding' => "iso-8859-1") + ['encoding' => "iso-8859-1"] ); match( @@ -80,7 +80,7 @@ match( utf8_decode('foo Object ( [val] => & <a> & <b> & <c> ü ) '), 'Predecode illegal entities while keeping properly encoded ones (iso-8859-1)', "", - array('encoding' => "iso-8859-1") + ['encoding' => "iso-8859-1"] ); match( @@ -88,7 +88,7 @@ match( 'foo Object ( [val] => a b ) ', 'Illegal latin 1 character', "", - array('encoding' => "iso-8859-1") + ['encoding' => "iso-8859-1"] ); # Test inheritance @@ -116,8 +116,8 @@ match( 'my' ); -$x = new foo("<foo></foo>", array('prefix' => "test")); -$x->set(array('gna' => 42, 'bar' => array('baz' => array("qux", "quux")))); +$x = new foo("<foo></foo>", ['prefix' => "test"]); +$x->set(['gna' => 42, 'bar' => ['baz' => ["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 ) ) ) ) ', |