Commit | Line | Data |
fda8a675 |
1 | use strict; |
2 | use warnings; |
3 | |
4 | use Test::More; |
aa2ae81e |
5 | |
6 | BEGIN { |
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 |
12 | use DBIx::Class::Storage::Debug::PrettyPrint; |
13 | |
14 | my $cap; |
15 | open my $fh, '>', \$cap; |
16 | |
17 | my $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')); |
27 | is( |
28 | $cap, |
c4d7cfcf |
29 | qq{INSERT INTO self_ref_alias( alias, self_ref ) VALUES( ?, ? ) : '__BULK_INSERT__', '1'\n}, |
fda8a675 |
30 | 'SQL Logged' |
31 | ); |
32 | |
33 | done_testing; |