use inlined module hiding in tests
[catagits/Catalyst-Runtime.git] / t / aggregate / unit_core_component_mro.t
CommitLineData
35154983 1use Test::More tests => 1;
6a7254b5 2use strict;
3use warnings;
4
5{
6 package MyApp::Component;
7 use Test::More;
8
c48335a3 9 sub COMPONENT {
35154983 10 fail 'This no longer gets dispatched to';
6a7254b5 11 }
12
13 package MyApp::MyComponent;
14
15 use base 'Catalyst::Component', 'MyApp::Component';
16
17}
18
35154983 19my $warn = '';
5d50f369 20{
6a7254b5 21 local $SIG{__WARN__} = sub {
5d50f369 22 $warn .= $_[0];
6a7254b5 23 };
24 MyApp::MyComponent->COMPONENT('MyApp');
25}
35154983 26
5d50f369 27like($warn, qr/after Catalyst::Component in MyApp::Component/,
35154983 28 'correct warning thrown');
29