X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=t%2Flib%2Fdbixcsl_common_tests.pm;h=9051c8d9717515c31829b7b63eada20327d89b5d;hb=3568bda98bc24d41e7f5a253a56b258c9aae86fc;hp=5c1516173cb9dd395237229fe53030c8f7c44430;hpb=e00d61acf4f772083500a04783a8bce56dc322bf;p=dbsrgits%2FDBIx-Class-Schema-Loader.git diff --git a/t/lib/dbixcsl_common_tests.pm b/t/lib/dbixcsl_common_tests.pm index 5c15161..9051c8d 100644 --- a/t/lib/dbixcsl_common_tests.pm +++ b/t/lib/dbixcsl_common_tests.pm @@ -156,7 +156,14 @@ sub run_only_extra_tests { $dbh->do($_) for @{ $self->{extra}{create} || [] }; if (not ($self->{vendor} eq 'mssql' && $dbh->{Driver}{Name} eq 'Sybase')) { - $dbh->do($_) for @{ $self->{data_type_tests}{ddl} || []}; + foreach my $ddl (@{ $self->{data_type_tests}{ddl} || []}) { + if (my $cb = $self->{data_types_ddl_cb}) { + $cb->($ddl); + } + else { + $dbh->do($_) + } + } } $self->{_created} = 1; @@ -1864,7 +1871,14 @@ sub create { $dbh->do($_) foreach (@statements); if (not ($self->{vendor} eq 'mssql' && $dbh->{Driver}{Name} eq 'Sybase')) { - $dbh->do($_) foreach (@{ $self->{data_type_tests}{ddl} || [] }); + foreach my $ddl (@{ $self->{data_type_tests}{ddl} || [] }) { + if (my $cb = $self->{data_types_ddl_cb}) { + $cb->($ddl); + } + else { + $dbh->do($_) + } + } } unless ($self->{skip_rels}) {