Debian Codegraph @

t/classes/Dancer2-Core-Role-Engine/with.t

raw
1 use strict;
2 use warnings;
3 use Test::More tests => 4;
4
5 {
6 package App;
7 use Moo;
8 with 'Dancer2::Core::Role::Engine';
9 sub hook_aliases { +{} }
10 sub supported_hooks {}
11 }
12
13 my $app = App->new;
14 isa_ok( $app, 'App' );
15 can_ok( $app, qw<session config> ); # attributes
16 can_ok( $app, qw<set_session clear_session has_session> ); # methods
17 ok(
18 $app->DOES('Dancer2::Core::Role::Hookable'),
19 'App consumes Dancer2::Core::Role::Hookable',
20 );
21