Merge 'trunk' into 'chaining_fixes'
[dbsrgits/DBIx-Class.git] / t / cdbi / 08-inheritcols.t
CommitLineData
d2cee1fa 1use strict;
a2ed1a5f 2use Test::More;
d2cee1fa 3
a2ed1a5f 4BEGIN {
5 eval "use DBIx::Class::CDBICompat;";
6 plan $@ ? (skip_all => 'Class::Trigger and DBIx::ContextualFetch required')
7 : (tests=> 3);
8}
d2cee1fa 9
10package A;
a2ed1a5f 11@A::ISA = qw(DBIx::Class::CDBICompat);
d2cee1fa 12__PACKAGE__->columns(Primary => 'id');
13
14package A::B;
15@A::B::ISA = 'A';
16__PACKAGE__->columns(All => qw(id b1));
17
18package A::C;
19@A::C::ISA = 'A';
20__PACKAGE__->columns(All => qw(id c1 c2 c3));
21
22package main;
23is join (' ', sort A->columns), 'id', "A columns";
24is join (' ', sort A::B->columns), 'b1 id', "A::B columns";
25is join (' ', sort A::C->columns), 'c1 c2 c3 id', "A::C columns";