failing (crashing, really) test for this strange pg thing. could not figure out...
[dbsrgits/DBIx-Class.git] / t / dbh_do.t
CommitLineData
3ff1602f 1#!/usr/bin/perl
2
3use strict;
4use warnings;
5
6use Test::More tests => 8;
7use lib qw(t/lib);
8use DBICTest;
9
10
11my $schema = DBICTest->init_schema();
12my $storage = $schema->storage;
13
14my $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
26my $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