11 sub _is_this_the_app { 'oh yeah' }
16 use base qw/Catalyst::Component::ACCEPT_CONTEXT Catalyst::Component/;
20 return $class->next::method(@_);
24 use Test::More tests => 4;
25 use Scalar::Util qw/refaddr/;
27 my $app_class = 'MyApp';
29 my $foo = Foo->COMPONENT($app_class, { args => 'yes' });
30 is $foo->{args}, 'yes', 'foo created';
31 is $foo->context->_is_this_the_app, 'oh yeah', 'got app';
34 my $foo2 = $foo->ACCEPT_CONTEXT($ctx);
35 is refaddr($foo), refaddr($foo2), 'foo and foo2 are the same ref';
36 is refaddr($foo->context), refaddr($ctx), 'got ctx';