CHI/t/Driver/File/DepthZero.pm

filter: Statementstmt 100% 30 / 30 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 100% 10 / 10 Podpod 0.0% 0 / 3 totaltotal 93.0% 40 / 43 SCAR 0.0
CC
1
Cov
100%
BEGIN
1.0
BEGIN
1.0
BEGIN
1.0
CRAP 1.0
« CHI/t/Driver/NonMoose.pm ↑ Summary CHI/t/Initialize.pm »
1 package CHI::t::Driver::File::DepthZero;
2 1 $CHI::t::Driver::File::DepthZero::VERSION = '0.59';
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 File::Temp qw(tempdir);
Subroutine BEGIN: called CC=1 SCAR=0.0
7 1 ▶use File::Basename qw(dirname);
Subroutine BEGIN: called CC=1 SCAR=0.0
8 1 ▶use base qw(CHI::t::Driver::File);
Subroutine BEGIN: called CC=1 SCAR=0.0
9  
10 # Test file driver with zero depth
11  
12 102 ▶sub testing_driver_class { 'CHI::Driver::File' }
Subroutine testing_driver_class: called CC=1 SCAR=0.0
Pod undocumented
13  
14 sub new_cache_options {
15 98 ▶ my $self = shift;
Subroutine new_cache_options: called CC=1 SCAR=0.0
Pod undocumented
16  
17 98 return ( $self->SUPER::new_cache_options(), depth => 0 );
18 }
19  
20 sub test_default_depth : Tests {
21 1 ▶ my $self = shift;
Subroutine test_default_depth: called CC=1 SCAR=0.0
Pod undocumented
22  
23 1 my $cache = $self->new_cache();
24 1 is( $cache->depth, 0 );
25 1 is( dirname( $cache->path_to_key('foo') ),
26 $cache->path_to_namespace, "data files are one level below namespace" );
27 1 ▶}
Subroutine BEGIN: called CC=1 SCAR=0.0
28  
29 1 1;
« CHI/t/Driver/NonMoose.pm ↑ Summary CHI/t/Initialize.pm »