X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=t%2Funit_core_component_mro.t;fp=t%2Funit_core_component_mro.t;h=78184028383dec44e19e75b47d5a35ddf1b24779;hb=6a7254b57957f4f40cee98226a93b012c5427cfe;hp=0000000000000000000000000000000000000000;hpb=4090e3bb3fea1a73ac369250e31584d61428b808;p=catagits%2FCatalyst-Runtime.git diff --git a/t/unit_core_component_mro.t b/t/unit_core_component_mro.t new file mode 100644 index 0000000..7818402 --- /dev/null +++ b/t/unit_core_component_mro.t @@ -0,0 +1,26 @@ +use Test::More tests => 2; +use strict; +use warnings; + +{ + package MyApp::Component; + use Test::More; + + sub COMPONENT{ + my $caller = caller; + is($caller, 'Catalyst::Component', 'Correct method resolution'); + } + + package MyApp::MyComponent; + + use base 'Catalyst::Component', 'MyApp::Component'; + +} + +{ + my $expects = qr/after Catalyst::Component in MyApp::Component/; + local $SIG{__WARN__} = sub { + like($_[0], $expects, 'correct warning thrown'); + }; + MyApp::MyComponent->COMPONENT('MyApp'); +}