Merge 'trunk' into 'DBIx-Class-current'
[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
d6fd7084 10plan tests => 2;
6db94aca 11
12# Tests if foreign component was loaded by calling foreign's method
13ok( DBICTest::ForeignComponent->foreign_test_method, 'foreign component' );
14
d6fd7084 15# Test for inject_base to filter out duplicates
16{ package DBICTest::_InjectBaseTest;
17 use base qw/ DBIx::Class /;
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);