7 # ask for a recent DBIC version to skip the 5.6 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') };
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/;
15 use DBIx::Class::Storage::Debug::PrettyPrint;
18 open my $fh, '>', \$cap;
20 my $pp = DBIx::Class::Storage::Debug::PrettyPrint->new({
23 fill_in_placeholders => 1,
24 placeholder_surround => ['', ''],
30 $pp->query_start('SELECT * FROM frew WHERE id = ?', q('1'));
33 qq(SELECT * FROM frew WHERE id = '1'\n),
38 $pp->query_start('SELECT * FROM frew WHERE id = ?', q('2'));
42 'Repeated SQL ellided'
46 $pp->query_start('SELECT * FROM frew WHERE id = ?', q('3'));
50 'Repeated SQL ellided'
54 $pp->query_start('SELECT * FROM frew WHERE id = ?', q('4'));
58 'Repeated SQL ellided'
62 $pp->query_start('SELECT * FROM bar WHERE id = ?', q('4'));
65 qq(SELECT * FROM bar WHERE id = '4'\n),
70 $pp->query_start('SELECT * FROM frew WHERE id = ?', q('1'));
73 qq(SELECT * FROM frew WHERE id = '1'\n),