4 use Test::More tests => 3;
8 use DBICTest::Schema::Artist;
10 DBICTest::Schema::Artist->source_name('MyArtist');
13 local $SIG{__WARN__} = sub { $w = shift };
14 DBICTest::Schema->register_class('FooA', 'DBICTest::Schema::Artist');
15 like ($w, qr/use register_extra_source/, 'Complain about using register_class on an already-registered class');
18 my $schema = DBICTest->init_schema();
20 my $a = $schema->resultset('FooA')->search;
21 is($a->count, 3, 'have 3 artists');
22 is($schema->class('FooA'), 'DBICTest::FooA', 'Correct artist class');
25 DBICTest::Schema->_unregister_source('FooA');