CHI/t/Initialize.pm

filter: Statementstmt 100% 34 / 34 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 100% 10 / 10 Podpod 0.0% 0 / 3 totaltotal 93.6% 44 / 47 CC 1 SCAR 0.0
CC
1
Cov
100%
BEGIN
1.0
BEGIN
1.0
BEGIN
1.0
CRAP 1.0
« CHI/t/Driver/File/DepthZero.pm ↑ Summary CHI/Test/Driver/Readonly.pm »
1 package CHI::t::Initialize;
2 1 $CHI::t::Initialize::VERSION = '0.60';
3 1 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
4 1 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
5 1 ▶use CHI::Test;
Subroutine BEGIN: called CC=1 SCAR=0.0
6 1 ▶use CHI::Util qw(dump_one_line);
Subroutine BEGIN: called CC=1 SCAR=0.0
7 1 ▶use base qw(CHI::Test::Class);
Subroutine BEGIN: called CC=1 SCAR=0.0
8  
9 sub is_good {
10 4 ▶ my (@params) = @_;
Subroutine is_good: called CC=1 SCAR=0.0
Pod undocumented
11  
12 4 my $cache = CHI->new(@params);
13 4 isa_ok(
14 $cache,
15 'CHI::Driver',
16 sprintf( "got a good cache with params '%s'",
17 dump_one_line( \@params ) )
18 );
19 }
20  
21 sub is_bad {
22 3 ▶ my (@params) = @_;
Subroutine is_bad: called CC=1 SCAR=0.0
Pod undocumented
23  
24 3 ▶ dies_ok( sub { my $cache = CHI->new(@params) },
Subroutine __ANON__: called CC=1 SCAR=0.0
25 3 sprintf( "died with params '%s'", dump_one_line( \@params ) ) );
26 }
27  
28 sub test_driver_options : Tests {
29 1 ▶ my $cache;
Subroutine test_driver_options: called CC=1 SCAR=0.0
Pod undocumented
30 1 is_good( driver => 'Memory', global => 1 );
31 1 is_good( driver => 'File' );
32 1 is_good( driver_class => 'CHI::Driver::Memory', global => 1 );
33 1 is_good( driver_class => 'CHI::Driver::File' );
34 1 is_bad( driver_class => 'Memory' );
35 1 is_bad( driver => 'CHI::Driver::File' );
36 1 is_bad( driver => 'DoesNotExist' );
37 1 ▶}
Subroutine BEGIN: called CC=1 SCAR=0.0
38  
39 1 1;
« CHI/t/Driver/File/DepthZero.pm ↑ Summary CHI/Test/Driver/Readonly.pm »