| 1 | package CHI::Driver::Redis::t::CHIDriverTests; | ||||||||||||||||||||||||
| 2 | 1 | ▶ | use strict; | ||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||
| 3 | 1 | ▶ | use warnings; | ||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||
| 4 | 1 | ▶ | use CHI::Test; | ||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||
| 5 | |||||||||||||||||||||||||
| 6 | 1 | ▶ | use base qw(CHI::t::Driver); | ||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||
| 7 | |||||||||||||||||||||||||
| 8 | 1 | ▶ | use Test::Mock::Redis; | ||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||
| 9 | |||||||||||||||||||||||||
| 10 | 139 | ▶ | sub testing_driver_class { 'CHI::Driver::Redis' } | ||||||||||||||||||||||
|
Subroutine
testing_driver_class: called CC=1 SCAR=0.0
Pod
undocumented
| |||||||||||||||||||||||||
| 11 | |||||||||||||||||||||||||
| 12 | 1 | ▶ | sub supports_expires_on_backend { 1 } | ||||||||||||||||||||||
|
Subroutine
supports_expires_on_backend: called CC=1 SCAR=0.0
Pod
undocumented
| |||||||||||||||||||||||||
| 13 | |||||||||||||||||||||||||
| 14 | sub new_cache_options { | ||||||||||||||||||||||||
| 15 | 135 | ▶ | my $self = shift; | ||||||||||||||||||||||
|
Subroutine
new_cache_options: called CC=4 SCAR=15.8
Pod
undocumented
| |||||||||||||||||||||||||
| 16 | |||||||||||||||||||||||||
| 17 | return ( | ||||||||||||||||||||||||
| 18 | $self->SUPER::new_cache_options(), | ||||||||||||||||||||||||
| 19 | driver_class => 'CHI::Driver::Redis', | ||||||||||||||||||||||||
| 20 | redis_class => (defined $ENV{CHI_REDIS_SERVER} ? 'Redis' : 'Test::Mock::Redis'), | ||||||||||||||||||||||||
| 21 | server => $ENV{CHI_REDIS_SERVER} || undef, | ||||||||||||||||||||||||
| 22 | 135 | ▶ | ($ENV{CHI_REDIS_PASSWORD} ? ( password => $ENV{CHI_REDIS_PASSWORD} ) : ()), | ||||||||||||||||||||||
|
Branch: 2 branches
Condition50%1/2
$ENV{'CHI_REDIS_SERVER'} || undef
MC/DC0%0/1
$ENV{'CHI_REDIS_SERVER'} || undef
$ENV{'CHI_REDIS_SERVER'}
Truth table50%1/2
A
A= $ENV{'CHI_REDIS_SERVER'}
| |||||||||||||||||||||||||
| 23 | prefix => 'test' . $$ . ':', | ||||||||||||||||||||||||
| 24 | ); | ||||||||||||||||||||||||
| 25 | } | ||||||||||||||||||||||||
| 26 | |||||||||||||||||||||||||
| 27 | sub clear_redis : Test(setup) { | ||||||||||||||||||||||||
| 28 | 48 | ▶ | my ($self) = @_; | ||||||||||||||||||||||
|
Subroutine
clear_redis: called CC=1 SCAR=0.0
Pod
undocumented
| |||||||||||||||||||||||||
| 29 | |||||||||||||||||||||||||
| 30 | 48 | my $cache = $self->new_cache; | |||||||||||||||||||||||
| 31 | 48 | $cache->_verify_redis_connection; | |||||||||||||||||||||||
| 32 | 48 | $cache->redis->flushall; | |||||||||||||||||||||||
| 33 | 1 | ▶ | } | ||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||
| 34 | |||||||||||||||||||||||||
| 35 | 1 | 1; | |||||||||||||||||||||||