Institute a central "load this first in testing" package
[dbsrgits/DBIx-Class.git] / t / 63register_class.t
CommitLineData
c0329273 1BEGIN { do "./t/lib/ANFANG.pm" or die ( $@ || $! ) }
2
b9537280 3use strict;
8273e845 4use warnings;
b9537280 5
e1f06f1c 6use Test::More tests => 2;
c0329273 7
b9537280 8use DBICTest;
9use DBICTest::Schema;
10use DBICTest::Schema::Artist;
11
12DBICTest::Schema::Artist->source_name('MyArtist');
e1f06f1c 13DBICTest::Schema->register_class('FooA', 'DBICTest::Schema::Artist');
b9537280 14
15my $schema = DBICTest->init_schema();
16
17my $a = $schema->resultset('FooA')->search;
18is($a->count, 3, 'have 3 artists');
19is($schema->class('FooA'), 'DBICTest::FooA', 'Correct artist class');
fccc2e87 20
21# clean up
22DBICTest::Schema->_unregister_source('FooA');