Only load DBICTest::Schema when needed in tests
[dbsrgits/DBIx-Class.git] / t / storage / deprecated_exception_source_bind_attrs.t
CommitLineData
97202028 1use strict;
2use warnings;
3
4use Test::More;
5use Test::Warn;
6use Test::Exception;
7use lib qw(t/lib);
8use DBICTest;
2c2bc4e5 9use DBICTest::Schema;
97202028 10
11{
12 package DBICTest::Legacy::Storage;
13 use base 'DBIx::Class::Storage::DBI::SQLite';
14
15 use Data::Dumper::Concise;
16
17 sub source_bind_attributes { return {} }
18}
19
20
21my $schema = DBICTest::Schema->clone;
22$schema->storage_type('DBICTest::Legacy::Storage');
23$schema->connection('dbi:SQLite::memory:');
24
25throws_ok
26 { $schema->storage->ensure_connected }
27 qr/\Qstorage subclass DBICTest::Legacy::Storage provides (or inherits) the method source_bind_attributes()/,
28 'deprecated use of source_bind_attributes throws',
29;
30
31done_testing;