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