Commit | Line | Data |
c0329273 |
1 | BEGIN { do "./t/lib/ANFANG.pm" or die ( $@ || $! ) } |
2 | |
b9537280 |
3 | use strict; |
8273e845 |
4 | use warnings; |
b9537280 |
5 | |
e1f06f1c |
6 | use Test::More tests => 2; |
c0329273 |
7 | |
b9537280 |
8 | use DBICTest; |
9 | use DBICTest::Schema; |
10 | use DBICTest::Schema::Artist; |
11 | |
12 | DBICTest::Schema::Artist->source_name('MyArtist'); |
e1f06f1c |
13 | DBICTest::Schema->register_class('FooA', 'DBICTest::Schema::Artist'); |
b9537280 |
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'); |
fccc2e87 |
20 | |
21 | # clean up |
22 | DBICTest::Schema->_unregister_source('FooA'); |