X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=t%2Fstorage%2Fdisable_sth_caching.t;h=494780d631fbe11376298dece807fa2ed3b06c44;hb=47bc746e9372902edd584d30b27289a46735dc9f;hp=5ad4cca746f6ff2dfe5a29a28655d2cee75e5bb1;hpb=2dc8d9618fd296ecdd4484d3686832de0592e747;p=dbsrgits%2FDBIx-Class.git diff --git a/t/storage/disable_sth_caching.t b/t/storage/disable_sth_caching.t index 5ad4cca..494780d 100644 --- a/t/storage/disable_sth_caching.t +++ b/t/storage/disable_sth_caching.t @@ -1,19 +1,28 @@ use strict; -use warnings; +use warnings; + +BEGIN { $ENV{DBICTEST_VIA_REPLICATED} = 0 } use Test::More; use lib qw(t/lib); use DBICTest; -plan tests => 2; +##!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! +## This test uses undocumented internal methods +## DO NOT USE THEM IN THE SAME MANNER +## They are subject to ongoing change +##!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! # Set up the "usual" sqlite for DBICTest my $schema = DBICTest->init_schema; +my $dbh = $schema->storage->_get_dbh; -my $sth_one = $schema->storage->sth('SELECT 42'); -my $sth_two = $schema->storage->sth('SELECT 42'); +my $sth_one = $schema->storage->_prepare_sth($dbh, 'SELECT 42'); +my $sth_two = $schema->storage->_prepare_sth($dbh, 'SELECT 42'); $schema->storage->disable_sth_caching(1); -my $sth_three = $schema->storage->sth('SELECT 42'); +my $sth_three = $schema->storage->_prepare_sth($dbh, 'SELECT 42'); ok($sth_one == $sth_two, "statement caching works"); ok($sth_two != $sth_three, "disabling statement caching works"); + +done_testing;