X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=t%2Fcdbi%2FDeepAbstractSearch%2F01_search.t;h=5c87cb0bcc2b2a1b26f17155e527fd498536bfc1;hb=12e7015aa9372aeaf1aaa7e125b8ac8da216deb5;hp=95ad021a70b7dfdbf64a179eebd210025bc64977;hpb=4a233f3019d2baa4bf2abee0c873c74d5cdf3a11;p=dbsrgits%2FDBIx-Class.git diff --git a/t/cdbi/DeepAbstractSearch/01_search.t b/t/cdbi/DeepAbstractSearch/01_search.t index 95ad021..5c87cb0 100644 --- a/t/cdbi/DeepAbstractSearch/01_search.t +++ b/t/cdbi/DeepAbstractSearch/01_search.t @@ -1,14 +1,12 @@ +BEGIN { do "./t/lib/ANFANG.pm" or die ( $@ || $! ) } +use DBIx::Class::Optional::Dependencies -skip_all_without => qw( cdbicompat Class::DBI::Plugin::DeepAbstractSearch>=0 ); + use strict; use warnings; -use Test::More; -use lib 't/cdbi/testlib'; -use DBIC::Test::SQLite (); # this will issue the necessary SKIPs on missing reqs +use Test::More; -BEGIN { - eval { require Class::DBI::Plugin::DeepAbstractSearch } - or plan skip_all => 'Class::DBI::Plugin::DeepAbstractSearch required for this test'; -} +use DBICTest; my $DB = DBICTest->_sqlite_dbname(sqlite_use_file => 1);; @@ -21,6 +19,24 @@ my @DSN = ("dbi:SQLite:dbname=$DB", '', '', { AutoCommit => 0 }); package Music::DBI; use base qw(DBIx::Class::CDBICompat); use Class::DBI::Plugin::DeepAbstractSearch; + +BEGIN { + # offset the warning from DBIx::Class::Schema on 5.8 + # keep the ::Schema default as-is otherwise + DBIx::Class::_ENV_::OLD_MRO + and + ( eval <<'EOS' or die $@ ); + + sub setup_schema_instance { + my $s = shift->next::method(@_); + $s->schema_sanity_checker(''); + $s; + } + + 1; +EOS +} + __PACKAGE__->connection(@DSN); my $sql = <<'SQL_END';