Croak on invalid top-level special ops
[dbsrgits/SQL-Abstract.git] / t / dbic / bulk-insert.t
CommitLineData
fda8a675 1use strict;
2use warnings;
3
4use Test::More;
aa2ae81e 5
6BEGIN {
7 # ask for a recent DBIC version to skip the 5.6.2 tests as well
8 plan skip_all => 'Test temporarily requires DBIx::Class'
9 unless eval { require DBIx::Class::Storage::Statistics; DBIx::Class->VERSION('0.08124') };
10}
11
fda8a675 12use DBIx::Class::Storage::Debug::PrettyPrint;
13
14my $cap;
15open my $fh, '>', \$cap;
16
17my $pp = DBIx::Class::Storage::Debug::PrettyPrint->new({
18 profile => 'none',
19 fill_in_placeholders => 1,
20 placeholder_surround => [qw(' ')],
21 show_progress => 0,
22});
23
24$pp->debugfh($fh);
25
26$pp->query_start('INSERT INTO self_ref_alias (alias, self_ref) VALUES ( ?, ? )', qw('__BULK_INSERT__' '1'));
27is(
28 $cap,
c4d7cfcf 29 qq{INSERT INTO self_ref_alias( alias, self_ref ) VALUES( ?, ? ) : '__BULK_INSERT__', '1'\n},
fda8a675 30 'SQL Logged'
31);
32
33done_testing;