(travis) Make more helper functions available to subexecs
[dbsrgits/DBIx-Class.git] / t / 63register_class.t
1 BEGIN { do "./t/lib/ANFANG.pm" or die ( $@ || $! ) }
2
3 use strict;
4 use warnings;
5
6 use Test::More tests => 2;
7
8 use DBICTest;
9 use DBICTest::Schema;
10 use DBICTest::Schema::Artist;
11
12 DBICTest::Schema::Artist->source_name('MyArtist');
13 DBICTest::Schema->register_class('FooA', 'DBICTest::Schema::Artist');
14
15 my $schema = DBICTest->init_schema();
16
17 my $a = $schema->resultset('FooA')->search;
18 is($a->count, 3, 'have 3 artists');
19 is($schema->class('FooA'), 'DBICTest::FooA', 'Correct artist class');
20
21 # clean up
22 DBICTest::Schema->_unregister_source('FooA');