X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=trunk%2Ft%2Faggregate%2Funit_core_component_mro.t;fp=trunk%2Ft%2Faggregate%2Funit_core_component_mro.t;h=8e9a064bf5840ab016218e8835036cfbb62746e1;hb=e28a6876ad3e11890226e5bab6df4b0725e0981e;hp=0000000000000000000000000000000000000000;hpb=21c94d83082b43028cafcfb18659090b13d832fa;p=catagits%2FCatalyst-Runtime.git diff --git a/trunk/t/aggregate/unit_core_component_mro.t b/trunk/t/aggregate/unit_core_component_mro.t new file mode 100644 index 0000000..8e9a064 --- /dev/null +++ b/trunk/t/aggregate/unit_core_component_mro.t @@ -0,0 +1,29 @@ +use Test::More tests => 1; +use strict; +use warnings; + +{ + package MyApp::Component; + use Test::More; + + sub COMPONENT { + fail 'This no longer gets dispatched to'; + } + + package MyApp::MyComponent; + + use base 'Catalyst::Component', 'MyApp::Component'; + +} + +my $warn = ''; +{ + local $SIG{__WARN__} = sub { + $warn .= $_[0]; + }; + MyApp::MyComponent->COMPONENT('MyApp'); +} + +like($warn, qr/after Catalyst::Component in MyApp::Component/, + 'correct warning thrown'); +