X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=t%2F19quotes.t;h=8750d5ad1139fd26105d59342788c03cfeb4aaa7;hb=27d619d8c3100065f87bdbcc7c1496cb2e5495c9;hp=2412e1d04cf716bcdb2ac19e367ba7c1556cbf00;hpb=9b4591296c196ea0a32e67159e35091b02ecc539;p=dbsrgits%2FDBIx-Class-Historic.git diff --git a/t/19quotes.t b/t/19quotes.t index 2412e1d..8750d5a 100644 --- a/t/19quotes.t +++ b/t/19quotes.t @@ -3,7 +3,9 @@ use warnings; use Test::More; use IO::File; -use SQL::Abstract::Test import => ['is_same_sql_bind']; + +use lib qw(t/lib); +use DBIC::SqlMakerTest; BEGIN { eval "use DBD::SQLite"; @@ -12,19 +14,18 @@ BEGIN { : ( tests => 7 ); } -use lib qw(t/lib); use_ok('DBICTest'); -use_ok('DBICTest::DBICDebugObj'); +use_ok('DBIC::DebugObj'); my $schema = DBICTest->init_schema(); -diag('Testing against ' . join(' ', map { $schema->storage->dbh->get_info($_) } qw/17 18/)); +#diag('Testing against ' . join(' ', map { $schema->storage->dbh->get_info($_) } qw/17 18/)); $schema->storage->sql_maker->quote_char('`'); $schema->storage->sql_maker->name_sep('.'); -my ($sql, @bind) = (''); -$schema->storage->debugobj(DBICTest::DBICDebugObj->new(\$sql, \@bind)); +my ($sql, @bind); +$schema->storage->debugobj(DBIC::DebugObj->new(\$sql, \@bind)); $schema->storage->debug(1); my $rs; @@ -35,7 +36,7 @@ $rs = $schema->resultset('CD')->search( eval { $rs->count }; is_same_sql_bind( $sql, \@bind, - "SELECT COUNT( * ) FROM `cd` `me` JOIN `artist` `artist` ON ( `artist`.`artistid` = `me`.`artist` ) WHERE ( `artist`.`name` = ? AND `me`.`year` = ? )", ["'Caterwauler McCrae'", "'2001'"], + "SELECT COUNT( * ) FROM cd `me` JOIN `artist` `artist` ON ( `artist`.`artistid` = `me`.`artist` ) WHERE ( `artist`.`name` = ? AND `me`.`year` = ? )", ["'Caterwauler McCrae'", "'2001'"], 'got correct SQL for count query with quoting' ); @@ -59,7 +60,7 @@ $rs = $schema->resultset('CD')->search( eval { $rs->count }; is_same_sql_bind( $sql, \@bind, - "SELECT COUNT( * ) FROM [cd] [me] JOIN [artist] [artist] ON ( [artist].[artistid] = [me].[artist] ) WHERE ( [artist].[name] = ? AND [me].[year] = ? )", ["'Caterwauler McCrae'", "'2001'"], + "SELECT COUNT( * ) FROM cd [me] JOIN [artist] [artist] ON ( [artist].[artistid] = [me].[artist] ) WHERE ( [artist].[name] = ? AND [me].[year] = ? )", ["'Caterwauler McCrae'", "'2001'"], 'got correct SQL for count query with bracket quoting' );