5 use Test::More tests => 4;
7 my $app = { app => 'oh yeah' };
9 my $foo = Foo->COMPONENT($app, { args => 'yes' });
10 is $foo->{args}, 'yes', 'foo created';
11 is $foo->context->{app}, 'oh yeah', 'got app';
13 my $ctx = { ctx => 'it is' };
14 my $foo2 = $foo->ACCEPT_CONTEXT($ctx);
15 is $foo, $foo2, 'foo and foo2 are the same ref';
16 is $foo->context->{ctx}, 'it is', 'got ctx';
20 use base qw/Catalyst::Component::ACCEPT_CONTEXT Catalyst::Component/;
24 return $class->next::method(@_);