Create branch register_actions.
[catagits/Catalyst-Runtime.git] / t / unit_core_plugin.t
CommitLineData
836e1134 1#!/usr/bin/perl
2
3use strict;
4use warnings;
5
d0d4d785 6use Test::More tests => 22;
836e1134 7
8use lib 't/lib';
9
10{
11
12 package Faux::Plugin;
13
14 sub new { bless {}, shift }
15 my $count = 1;
16 sub count { $count++ }
17}
18
836e1134 19use Catalyst::Test qw/PluginTestApp/;
20
21ok( get("/compile_time_plugins"), "get ok" );
ae29b412 22# FIXME - Run time plugin support is insane, and should be removed
23# for Catalyst 5.9
836e1134 24ok( get("/run_time_plugins"), "get ok" );
d0d4d785 25
26use_ok 'TestApp';
27my @expected = qw(
28 Catalyst::Plugin::Test::Errors
29 Catalyst::Plugin::Test::Headers
d13a7137 30 Catalyst::Plugin::Test::Inline
d0d4d785 31 Catalyst::Plugin::Test::Plugin
ae29b412 32 TestApp::Plugin::AddDispatchTypes
d0d4d785 33 TestApp::Plugin::FullyQualified
34);
35
36# Faux::Plugin is no longer reported
37is_deeply [ TestApp->registered_plugins ], \@expected,
38 'registered_plugins() should only report the plugins for the current class';