Possible to set locale in IC::DateTime extra => {} config
[dbsrgits/DBIx-Class.git] / t / dbh_do.t
1 #!/usr/bin/perl
2
3 use strict;
4 use warnings;  
5
6 use Test::More tests => 8;
7 use lib qw(t/lib);
8 use DBICTest;
9
10
11 my $schema = DBICTest->init_schema();
12 my $storage = $schema->storage;
13
14 my $test_func = sub {
15     is $_[0], $storage;
16     is $_[1], $storage->dbh;
17     is $_[2], "foo";
18     is $_[3], "bar";
19 };
20
21 $storage->dbh_do(
22     $test_func,
23     "foo", "bar"
24 );
25
26 my $storage_class = ref $storage;
27 {
28     no strict 'refs';
29     *{$storage_class .'::__test_method'} = $test_func;
30 }
31 $storage->dbh_do("__test_method", "foo", "bar");
32
33