summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Schneider2008-11-09 13:40:38 +0000
committerChristian Schneider2008-11-09 13:40:38 +0000
commit2373f73d5d607be77af8e18622fdad9559979386 (patch)
treed7dfe0fe8bb86b352eecb8966f78c9ec41243b72
parentfda5c71b5a3a2f0db439ea7c6a995eda38c8a629 (diff)
downloaditools-2373f73d5d607be77af8e18622fdad9559979386.tar.gz
itools-2373f73d5d607be77af8e18622fdad9559979386.tar.bz2
itools-2373f73d5d607be77af8e18622fdad9559979386.zip
Convert tests back to old syntax for consistency of itools syntax
-rwxr-xr-xtests/autoprepend.t16
-rwxr-xr-xtests/it_dbi.t4
-rwxr-xr-xtests/it_html.t16
3 files changed, 18 insertions, 18 deletions
diff --git a/tests/autoprepend.t b/tests/autoprepend.t
index e91996f..8f4f52f 100755
--- a/tests/autoprepend.t
+++ b/tests/autoprepend.t
@@ -12,29 +12,29 @@ $GLOBALS['it_text']->statictext = array(
is(
T('foo'),
"bar {v1}",
- "simple T()",
+ "simple T()"
);
is(
T('foo', 'en'),
"qux {v1}",
- "simple T() with language",
+ "simple T() with language"
);
is(
- T('foo', 'v1' => "gna<bber"),
+ T('foo', array('v1' => "gna<bber")),
"bar gna&lt;bber",
- "T() with quoted values",
+ "T() with quoted values"
);
is(
- T('foo', 'v1' => "gna<bber", 'en'),
+ T('foo', array('v1' => "gna<bber"), 'en'),
"qux gna&lt;bber",
- "T() with with quoted values and language",
+ "T() with with quoted values and language"
);
is(
- T('foo', 'en', 'v1' => "gna<bber"),
+ T('foo', 'en', array('v1' => "gna<bber")),
"qux gna&lt;bber",
- "T() with with language and quoted values",
+ "T() with with language and quoted values"
);
diff --git a/tests/it_dbi.t b/tests/it_dbi.t
index 0c30768..9ffadc7 100755
--- a/tests/it_dbi.t
+++ b/tests/it_dbi.t
@@ -37,7 +37,7 @@ is(
is(
$record->select(),
3,
- "select without parameters select all",
+ "select without parameters select all"
);
is(
@@ -169,7 +169,7 @@ foreach (new it_dbi_test as $id => $record)
is($count, 3, "Iterator without select");
$count = 0;
-foreach (new it_dbi_test('foo <>' => "") as $id => $record)
+foreach (new it_dbi_test(array('foo <>' => "")) as $id => $record)
{
$count++;
is($record->_key, $id, "Iterator id $id");
diff --git a/tests/it_html.t b/tests/it_html.t
index 31eda14..86afbf8 100755
--- a/tests/it_html.t
+++ b/tests/it_html.t
@@ -39,15 +39,15 @@ is(
);
is(
- it::replace('\n+\s*' => "", select('name' => "gna", 'multiple' => true, '1:foo,2:bar', '1,2')),
+ it::replace(array('\n+\s*' => ""), select(array('name' => "gna", 'multiple' => true), '1:foo,2:bar', '1,2')),
'<select name="gna" multiple><option value="1" selected>foo</option><option value="2" selected>bar</option></select>',
- "select tag with multiselect",
+ "select tag with multiselect"
);
is(
- it::replace('\n+\s*' => "", select('name' => "gna", array("1" => "foo", "2" => 'bar', '1,2' => "qux"), '1,2')),
+ it::replace(array('\n+\s*' => ""), select(array('name' => "gna"), array("1" => "foo", "2" => 'bar', '1,2' => "qux"), '1,2')),
'<select name="gna"><option value="1">foo</option><option value="2">bar</option><option value="1,2" selected>qux</option></select>',
- "link tag without multiselect",
+ "link tag without multiselect"
);
# XML generation
@@ -101,18 +101,18 @@ is(
'it_html::sanitize tag soup'
);
-it_html::configure('charset' => "utf-8");
+it_html::configure(array('charset' => "utf-8"));
is(
it_html::sanitize('q&uuml;x'),
"q\xc3\xbcx",
- 'it_html::sanitize with utf-8',
+ 'it_html::sanitize with utf-8'
);
-it_html::configure('charset' => "iso-8859-1");
+it_html::configure(array('charset' => "iso-8859-1"));
is(
it_html::sanitize('q&uuml;x'),
"q\xfcx",
- 'it_html::sanitize with latin1',
+ 'it_html::sanitize with latin1'
);
is(