summaryrefslogtreecommitdiff
path: root/test/it_xml.t
diff options
context:
space:
mode:
authorUrban Müller2020-04-21 01:03:53 +0200
committerUrban Müller2020-04-21 01:03:53 +0200
commitd987adefc85095f057c3d6d3eb2fa4c0d487d32b (patch)
tree4a6f7be8e35ff0c412666c41a46f22383d8ed5c2 /test/it_xml.t
parent1bd13e02d21ba01f38cd6df04de84b25a75a5264 (diff)
downloaditools-d987adefc85095f057c3d6d3eb2fa4c0d487d32b.tar.gz
itools-d987adefc85095f057c3d6d3eb2fa4c0d487d32b.tar.bz2
itools-d987adefc85095f057c3d6d3eb2fa4c0d487d32b.zip
use new array syntax
Diffstat (limited to 'test/it_xml.t')
-rwxr-xr-xtest/it_xml.t12
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] => &amp; <a> &amp; <b> &amp; <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 ) ) ) ) ',