Branch Coverage

blib/lib/Test/Mock/Class/Role/Object.pm
Criterion Covered Total %
branch 71 94 75.5


line true false branch
110 0 40 if not defined $expectation or (ref $expectation || '') ne 'HASH'
114 0 26 if not defined $$expectation{$method} or (ref $$expectation{$method} || '') ne 'ARRAY'
118 7 22 if (defined $$rule{'count'})
120 1 6 if $count != $$rule{'count'}
125 6 22 if (defined $$rule{'minimum'})
127 1 5 if $count < $$rule{'minimum'}
216 0 34 unless defined $method
236 0 16 unless defined $at and defined $method
260 0 4 unless defined $method
264 3 1 unless &blessed($exception)
291 0 1 unless defined $at and defined $method
310 0 36 unless defined $method
314 1 35 unless $self->meta->has_method($method)
336 0 4 unless defined $at and defined $method
354 0 1 unless defined $method and defined $count
372 0 5 unless defined $method and defined $count
389 0 3 unless defined $method and defined $count
406 0 5 unless defined $method
423 0 7 unless defined $method
440 0 3 unless defined $method
463 91 48 if not defined $rules_for_method or (ref $rules_for_method || '') ne 'ARRAY'
468 42 33 if (defined $$rule{'at'})
469 27 15 unless $timing == $$rule{'at'}
472 27 21 if (exists $$rule{'args'})
474 27 0 (ref $$rule{'args'} || '') eq 'ARRAY' ? :
478 3 24 unless @args == @rule_args
483 9 26 if ((ref $rule_arg || '') eq 'Regexp') { }
0 26 elsif (ref $rule_arg) { }
484 1 8 unless $args[$i] =~ /$rule_arg/
491 0 0 if $Test::Mock::Class::Role::Object::EVAL_ERROR
498 7 19 if $Test::Mock::Class::Role::Object::EVAL_ERROR
503 6 31 if (ref $$rule{'value'} eq 'CODE') { }
29 2 elsif (defined $$rule{'value'}) { }
546 103 42 if not defined $rules_for_method or (ref $rules_for_method || '') ne 'ARRAY'
553 12 38 if (defined $$rule{'at'})
554 8 4 unless $timing == $$rule{'at'}
559 17 25 if (exists $$rule{'args'})
561 17 0 (ref $$rule{'args'} || '') eq 'ARRAY' ? :
565 1 16 unless @args == @rule_args
570 6 22 if ((ref $rule_arg || '') eq 'Regexp') { }
0 22 elsif (ref $rule_arg) { }
584 3 36 if defined $$rule{'maximum'} and $$rule{'call'} > $$rule{'maximum'}
589 1 35 if defined $$rule{'count'} and $$rule{'call'} > $$rule{'count'}
594 0 35 if (defined $$rule{'assertion'})
595 0 0 if (ref $$rule{'assertion'} eq 'CODE') { }
604 6 36 if $Test::Mock::Class::Role::Object::EVAL_ERROR
607 6 36 if $e