From d987adefc85095f057c3d6d3eb2fa4c0d487d32b Mon Sep 17 00:00:00 2001 From: Urban Müller Date: Tue, 21 Apr 2020 01:03:53 +0200 Subject: use new array syntax --- test/it_xml.t | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'test/it_xml.t') 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] => & & & ü ) '), '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("", array('prefix' => "test")); -$x->set(array('gna' => 42, 'bar' => array('baz' => array("qux", "quux")))); +$x = new 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 ) ) ) ) ', -- cgit v1.2.3