5 use Test::MockObject::Extends;
7 use Test::More tests => 24;
15 sub new { bless {}, shift }
17 sub count { $count++ }
23 my $logger = Test::MockObject::Extends->new(PluginTestApp->log);
24 $logger->mock('warn', sub {
25 if ($_[1] =~ /plugin method is deprecated/) {
29 die "Caught unexpected warning: " . $_[1];
31 #PluginTestApp->log($logger);
33 use Catalyst::Test qw/PluginTestApp/;
35 ok( get("/compile_time_plugins"), "get ok" );
36 is( $warnings, 0, 'no warnings' );
37 # FIXME - Run time plugin support is insane, and should be removed
39 ok( get("/run_time_plugins"), "get ok" );
41 is( $warnings, 1, '1 warning' );
45 Catalyst::Plugin::Test::Errors
46 Catalyst::Plugin::Test::Headers
47 Catalyst::Plugin::Test::Inline
48 Catalyst::Plugin::Test::Plugin
49 TestApp::Plugin::AddDispatchTypes
50 TestApp::Plugin::FullyQualified
53 # Faux::Plugin is no longer reported
54 is_deeply [ TestApp->registered_plugins ], \@expected,
55 'registered_plugins() should only report the plugins for the current class';