Branch Coverage

blib/lib/Test/CallFlow.pm
Criterion Covered Total %
branch 80 148 54.0


line true false branch
384 0 0 defined $properties{$_} ? :
386 27 0 unless grep {defined $properties{$_} ? $$instance{$_} ne $properties{$_} : defined $$instance{$_};} keys %properties
406 0 5 if ref $class
410 0 40 exists $ENV{"mock_$_"} ? :
40 0 unless exists $self{$_}
415 0 5 if not exists $self{'debug'} and exists $ENV{'DEBUG'}
417 0 5 if $self{'debug'}
419 0 5 if ($self{'save'})
422 0 0 unless grep {$_ eq $dir;} @INC
428 0 5 if $self{'state'} == $Test::CallFlow::state{'record'}
429 5 0 if $self{'state'} == $Test::CallFlow::state{'plan'}
430 0 5 if $self{'state'} == $Test::CallFlow::state{'execute'}
446 0 1 isa($_[0], 'Test::CallFlow') ? :
450 0 1 unless $$self{'state'} == $Test::CallFlow::state{'plan'} or $$self{'state'} == $Test::CallFlow::state{'record'}
458 0 1 if ($Test::CallFlow::running || 0) == $self
459 1 0 if ($Test::CallFlow::planning || 0) == $self
476 0 14 isa($_[0], 'Test::CallFlow') ? :
486 0 14 if $@
491 6 8 if ($Test::CallFlow::planning || 0) == $self
508 1 6 isa($_[0], 'Test::CallFlow') ? :
510 0 6 if ($Test::CallFlow::planning || 0) == $self
511 6 0 if ($Test::CallFlow::running || 0) == $self
512 1 5 if ($Test::CallFlow::recording || 0) == $self
514 0 6 if ($$self{'state'} != $Test::CallFlow::state{'execute'} and $$self{'state'} != $Test::CallFlow::state{'failed'})
522 3 3 if (@unsatisfied)
553 0 4 isa($_[0], 'Test::CallFlow') ? :
561 0 4 unless $$self{'packages'}
569 1 6 if ($original_sub) { }
584 3 1 if ($Test::CallFlow::running || 0) == $self
585 0 4 if ($Test::CallFlow::recording || 0) == $self
617 0 7 isa($_[0], 'Test::CallFlow') ? :
619 0 7 unless my $name = shift()
620 0 7 if exists $$self{'packages'}{$name}
623 7 0 unless (exists $$self{'packages'}{$name}{'subs'}{'AUTOLOAD'})
631 14 1 unless my $sub = *{$namespace{$sub_name};}{'CODE'}
640 0 7 if $$self{'debug_mock'}
642 0 7 if $@
655 0 4 isa($_[0], 'Test::CallFlow') ? :
658 4 0 @_ ? :
689 19 0 isa($_[0], 'Test::CallFlow') ? :
692 0 19 unless exists $$self{'packages'}{$package}
715 49 0 isa($_[0], 'Test::CallFlow') ? :
720 1 48 unless my $target = {$Test::CallFlow::state{'plan'}, \&plan_mock_call, $Test::CallFlow::state{'execute'}, \&execute_mock_call, $Test::CallFlow::state{'record'}, \&record_mock_call}->{$$self{'state'} or 0}
726 0 48 if $$self{'debug_mock'}
738 0 1 isa($_[0], 'Test::CallFlow') ? :
770 3 1 unless defined $checker{'min'}
776 0 4 if $@
792 2 0 if @_ and $_[0] =~ /^\d+$/
793 2 0 if @_ and $_[0] =~ /^\d+$/
811 14 0 isa($_[0], 'Test::CallFlow') ? :
817 0 14 exists $$self{'packages'}{$package_name}{'save'} ? :
14 0 unless exists $$self{'packages'}{$package_name} and exists $$self{'packages'}{$package_name}{'save'} ? $$self{'packages'}{$package_name}{'save'} : $$self{'save'}
829 0 0 unless -d $dir
832 0 0 if $$self{'debug_mock'}
833 0 0 unless my $fh = 'IO::File'->open($fullfile, 'w')
835 0 0 unless $fh->close
848 21 0 isa($_[0], 'Test::CallFlow') ? :
850 0 21 unless defined $$self{'packages'}{$package_name}
879 100 0 isa($_[0], 'Test::CallFlow') ? :
898 0 14 isa($_[0], 'Test::CallFlow') ? :
915 0 12 unless my $sub = shift()
916 11 1 unless (ref $sub)
918 11 0 unless $$self{'packages'}{$package} and $$self{'packages'}{$package}{'subs'}{$sub}
922 0 12 ($$self{'debug'} || '') =~ /\bCall\b/ ? :
929 0 7 ($$self{'debug'} || '') =~ /\bPlan\b/ ? :
936 0 12 if $$self{'debug_mock'}
953 10 26 if ($@)
957 2 24 wantarray ? :
970 0 1 unless my $sub = shift()
973 0 1 unless my $package = $$self{'packages'}{$package_name}
976 0 1 unless my $orig = $$package{'original_subs'}{$sub_name}
979 0 1 wantarray ? :
982 1 0 if ($$self{'record_calls_from'}{$caller_package})
989 0 1 wantarray ? :