Branch Coverage

blib/lib/Mojo/UserAgent/Mockable.pm
Criterion Covered Total %
branch 32 46 69.5


line true false branch
76 0 42 if ($self->mode eq 'lwp-ua-mockable') { }
0 42 elsif ($self->mode ne 'record' and $self->mode ne 'playback' and $self->mode ne 'passthrough') { }
78 0 0 if ($self->file)
91 27 15 if ($self->mode eq "playback")
95 0 42 if ($self->_mode ne "passthrough" and not $self->file)
99 38 4 if ($self->_mode ne "passthrough")
102 0 38 unless ($self->can($mode_init))
113 263 27 unless @_
115 27 0 if ($self->mode eq 'playback') { }
125 81 0 if ($self->_mode eq 'record') { }
132 0 0 if warnings::enabled()
138 46 215 if ($cb)
147 0 27 unless (-e $self->file)
161 36 152 $self->_non_blocking ? :
166 70 118 if ($self->comparator->compare($this_req, $recorded_req)) { }
177 46 72 if ($self->unrecognized eq 'exception') { }
36 36 elsif ($self->unrecognized eq 'null') { }
36 0 elsif ($self->unrecognized eq 'fallback') { }
205 179 11 unless my $request_normalizer = $self->request_normalizer
206 0 11 if ref $request_normalizer ne "CODE"
223 2 71 if ($tx->req->proxy)
226 1 1 if $tx->req->method eq "CONNECT"
230 0 1 if $tx->connection