From 59556a4e21632543095c895f6693dfae78c710da Mon Sep 17 00:00:00 2001 From: Urban Müller Date: Tue, 25 Sep 2018 15:08:44 +0200 Subject: use created class it_dbi_test --- test/it_dbi.t | 11 +++++------ 1 file 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 -- cgit v1.2.3