2 #Simon Ilyushchenko, 12/05/05
3 #Testing the case when we try to inject into @ISA a class that's already a parent of the target class.
6 use Test::More tests => 2;
11 use base "DBIx::Class::Core";
17 #Injecting a direct parent.
18 __PACKAGE__->inject_base( __PACKAGE__, 'AAA' );
25 #Injecting an indirect parent.
26 __PACKAGE__->inject_base( __PACKAGE__, 'DBIx::Class::Core' );
29 eval { Class::C3::calculateMRO('BBB'); };
30 ok (! $@, "Correctly skipped injecting a direct parent of class BBB");
32 eval { Class::C3::calculateMRO('CCC'); };
33 ok (! $@, "Correctly skipped injecting an indirect parent of class BBB");