File: unit_core_component_mro.t

package info (click to toggle)
libcatalyst-perl 5.90132-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 3,016 kB
  • sloc: perl: 11,061; makefile: 7
file content (29 lines) | stat: -rw-r--r-- 474 bytes parent folder | download | duplicates (8)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
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');