summaryrefslogtreecommitdiff
path: root/test/it_dbi.t
diff options
context:
space:
mode:
authorUrban Müller2018-09-25 15:08:44 +0200
committerUrban Müller2018-09-25 15:08:44 +0200
commit59556a4e21632543095c895f6693dfae78c710da (patch)
tree95b05ba3d293ed72e6f7df98c6263206c6e0fa7c /test/it_dbi.t
parent3748b70de3ce4d0a2600f7ad8de0e4c5b1b438f4 (diff)
downloaditools-59556a4e21632543095c895f6693dfae78c710da.tar.gz
itools-59556a4e21632543095c895f6693dfae78c710da.tar.bz2
itools-59556a4e21632543095c895f6693dfae78c710da.zip
use created class it_dbi_test
Diffstat (limited to 'test/it_dbi.t')
-rwxr-xr-xtest/it_dbi.t11
1 files changed, 5 insertions, 6 deletions
diff --git a/test/it_dbi.t b/test/it_dbi.t
index 4e22152..025b2f7 100755
--- a/test/it_dbi.t
+++ b/test/it_dbi.t
@@ -13,8 +13,9 @@ $dbi->query('create temporary table it_dbi_test (
dyncols JSON,
primary key(ID)
);');
+it_dbi::createclass(array('table' => "it_dbi_test", 'forcecreate' => true));
-$record = new it_dbi($db + array('table' => "it_dbi_test"));
+$record = new it_dbi_test;
$record->insert(array('x' => 42, 'foo' => null));
$record->insert(array('foo' => "bar"));
@@ -80,8 +81,6 @@ is(
"select with implicit IN"
);
-it_dbi::createclass(array('table' => "it_dbi_test", 'forcecreate' => true));
-
$record = new it_dbi_test;
is(
$record->x,
@@ -110,14 +109,14 @@ is(
"constructor of created class with single array parameter"
);
-$record = new it_dbi($db + array('table' => "it_dbi_test"));
+$record = new it_dbi_test;
is(
$record->x,
null,
"constructor without parameters"
);
-$record = new it_dbi($db + array('table' => "it_dbi_test"), array('x >' => 0), "ORDER BY x DESC");
+$record = new it_dbi_test(array('x >' => 0), "ORDER BY x DESC");
is(
$record->x,
64738,
@@ -278,7 +277,7 @@ $GLOBALS['debug_sqllog'] = false;
# test latin1 (produces warnings on stderr for failing)
-$record = new it_dbi(array('table' => 'it_dbi_test', 'charset' => 'latin1'));
+$record = new it_dbi_test('charset' => 'latin1');
$record->select(array('foo' => "\xc3\x28"));
# Test field localization feature