Commit | Line | Data |
fda8a675 |
1 | use strict; |
2 | use warnings; |
3 | |
4 | use Test::More; |
aa2ae81e |
5 | |
6 | BEGIN { |
13da332c |
7 | # ask for a recent DBIC version to skip the 5.6 testing as well |
aa2ae81e |
8 | plan skip_all => 'Test temporarily requires DBIx::Class' |
9 | unless eval { require DBIx::Class::Storage::Statistics; DBIx::Class->VERSION('0.08124') }; |
13da332c |
10 | |
11 | plan skip_all => 'Test does not properly work with the pre-0.082800 DBIC trials' |
12 | if DBIx::Class->VERSION =~ /^0.082700\d\d/; |
aa2ae81e |
13 | } |
14 | |
fda8a675 |
15 | use DBIx::Class::Storage::Debug::PrettyPrint; |
16 | |
17 | my $cap; |
18 | open my $fh, '>', \$cap; |
19 | |
20 | my $pp = DBIx::Class::Storage::Debug::PrettyPrint->new({ |
21 | profile => 'none', |
22 | fill_in_placeholders => 1, |
23 | placeholder_surround => [qw(' ')], |
24 | show_progress => 0, |
25 | }); |
26 | |
27 | $pp->debugfh($fh); |
28 | |
29 | $pp->query_start('INSERT INTO self_ref_alias (alias, self_ref) VALUES ( ?, ? )', qw('__BULK_INSERT__' '1')); |
30 | is( |
31 | $cap, |
c4d7cfcf |
32 | qq{INSERT INTO self_ref_alias( alias, self_ref ) VALUES( ?, ? ) : '__BULK_INSERT__', '1'\n}, |
fda8a675 |
33 | 'SQL Logged' |
34 | ); |
35 | |
36 | done_testing; |