Even clearer unloaded FK exception
[dbsrgits/DBIx-Class-Historic.git] / t / 05components.t
CommitLineData
6db94aca 1#!/usr/bin/perl
2
3use strict;
4use warnings;
5use Test::More;
6
7use lib qw(t/lib);
8use DBICTest::ForeignComponent;
9
6db94aca 10# Tests if foreign component was loaded by calling foreign's method
11ok( DBICTest::ForeignComponent->foreign_test_method, 'foreign component' );
12
d6fd7084 13# Test for inject_base to filter out duplicates
14{ package DBICTest::_InjectBaseTest;
15 use base qw/ DBIx::Class /;
eb47985e 16 package DBICTest::_InjectBaseTest::A;
17 package DBICTest::_InjectBaseTest::B;
18 package DBICTest::_InjectBaseTest::C;
d6fd7084 19}
20DBICTest::_InjectBaseTest->inject_base( 'DBICTest::_InjectBaseTest', qw/
21 DBICTest::_InjectBaseTest::A
22 DBICTest::_InjectBaseTest::B
23 DBICTest::_InjectBaseTest::B
24 DBICTest::_InjectBaseTest::C
25/);
26is_deeply( \@DBICTest::_InjectBaseTest::ISA,
27 [qw/
28 DBICTest::_InjectBaseTest::A
29 DBICTest::_InjectBaseTest::B
30 DBICTest::_InjectBaseTest::C
31 DBIx::Class
32 /],
33 'inject_base filters duplicates'
34);
df88a29c 35
fe0e9f67 36use_ok('DBIx::Class::AccessorGroup');
48a76fcf 37use_ok('DBIx::Class::Componentised');
38
39done_testing;