Unicode plugin: import tests and update current ones
[catagits/Catalyst-Runtime.git] / t / lib / PluginTestApp.pm
1 package PluginTestApp;
2 use Test::More;
3
4 use Catalyst (
5     'Test::Plugin',
6     '+TestApp::Plugin::FullyQualified',
7     (eval { require MooseX::Role::Parameterized; 1 }
8         ? ('+TestApp::Plugin::ParameterizedRole' => { method_name => 'affe' })
9         : ()),
10 );
11
12 sub _test_plugins {
13     my $c = shift;
14     is_deeply [ $c->registered_plugins ],
15     [
16         qw/Catalyst::Plugin::Test::Plugin
17         Catalyst::Plugin::Unicode::Encoding
18         TestApp::Plugin::FullyQualified/
19     ],
20     '... and it should report the correct plugins';
21     ok $c->registered_plugins('Catalyst::Plugin::Test::Plugin'),
22     '... or if we have a particular plugin';
23     ok $c->registered_plugins('Test::Plugin'),
24     '... even if it is not fully qualified';
25     ok !$c->registered_plugins('No::Such::Plugin'),
26     '... and it should return false if the plugin does not exist';
27 }
28
29 __PACKAGE__->setup;