Commit | Line | Data |
c0329273 |
1 | BEGIN { do "./t/lib/ANFANG.pm" or die ( $@ || $! ) } |
2 | |
b33697ef |
3 | use strict; |
f54428ab |
4 | use warnings; |
b33697ef |
5 | |
8b60b921 |
6 | BEGIN { $ENV{DBICTEST_VIA_REPLICATED} = 0 } |
7 | |
b33697ef |
8 | use Test::More; |
c0329273 |
9 | |
b33697ef |
10 | use DBICTest; |
11 | |
9930caaf |
12 | ##!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! |
13 | ## This test uses undocumented internal methods |
14 | ## DO NOT USE THEM IN THE SAME MANNER |
15 | ## They are subject to ongoing change |
16 | ##!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! |
b33697ef |
17 | |
18 | # Set up the "usual" sqlite for DBICTest |
19 | my $schema = DBICTest->init_schema; |
9930caaf |
20 | my $dbh = $schema->storage->_get_dbh; |
b33697ef |
21 | |
9930caaf |
22 | my $sth_one = $schema->storage->_prepare_sth($dbh, 'SELECT 42'); |
23 | my $sth_two = $schema->storage->_prepare_sth($dbh, 'SELECT 42'); |
b33697ef |
24 | $schema->storage->disable_sth_caching(1); |
9930caaf |
25 | my $sth_three = $schema->storage->_prepare_sth($dbh, 'SELECT 42'); |
b33697ef |
26 | |
27 | ok($sth_one == $sth_two, "statement caching works"); |
28 | ok($sth_two != $sth_three, "disabling statement caching works"); |
9930caaf |
29 | |
30 | done_testing; |