Commit | Line | Data |
6a7254b5 |
1 | use Test::More tests => 2; |
2 | use strict; |
3 | use warnings; |
4 | |
5 | { |
6 | package MyApp::Component; |
7 | use Test::More; |
8 | |
9 | sub COMPONENT{ |
10 | my $caller = caller; |
11 | is($caller, 'Catalyst::Component', 'Correct method resolution'); |
12 | } |
13 | |
14 | package MyApp::MyComponent; |
15 | |
16 | use base 'Catalyst::Component', 'MyApp::Component'; |
17 | |
18 | } |
19 | |
20 | { |
21 | my $expects = qr/after Catalyst::Component in MyApp::Component/; |
22 | local $SIG{__WARN__} = sub { |
23 | like($_[0], $expects, 'correct warning thrown'); |
24 | }; |
25 | MyApp::MyComponent->COMPONENT('MyApp'); |
26 | } |