Branch Coverage

blib/lib/Test/Mock/Net/FTP.pm
Criterion Covered Total %
branch 79 84 94.0


line true false branch
200 1 250 unless exists $mock_server{$host}
219 248 2 !((defined $opts{'Passive'} || defined $opts{'Port'}) && !$opts{'Passive'}) ? :
222 1 1 defined $opts{'Port'} ? :
248 2 $connection_mode eq 'pasv' ? :
236 250 1 if ($self->_mock_login_auth($user, $pass))
241 248 2 if defined $dir->[0]
256 1 250 unless defined $server_user
356 1 1 unless (rename $self->_abs_remote($oldname), $self->_abs_remote($newname))
379 1 1 unless (unlink $self->_abs_remote($filename))
402 5 29 if (not defined $dirs) { }
2 27 elsif ($dirs =~ m[^/]) { }
463 3 40 if ($dir eq '..') { }
475 1 37 unless (-d $self->mock_pwd)
518 2 2 if (not !$recursive_bool) { }
519 1 1 unless (remove_tree($self->_abs_remote($dirname)))
525 1 1 unless (rmdir $self->_abs_remote($dirname))
548 2 3 if (not !$recursive_bool) { }
549 1 1 unless (make_path($self->_abs_remote($dirname)))
555 1 2 unless (mkdir $self->_abs_remote($dirname))
599 3 1 defined $dir ? :
601 3 1 if wantarray
608 0 4 unless opendir my $dh, $target_dir
634 3 1 if wantarray
654 4 1 unless defined $local_file
655 1 4 unless (copy($self->_abs_remote($remote_file), $self->_abs_local($local_file)))
681 7 2 unless defined $remote_file
682 1 8 unless (copy($self->_abs_local($local_file), $self->_abs_remote($remote_file)))
706 2 1 unless -e $self->_abs_remote($newfile)
721 2 0 unless defined $remote_file
724 1 1 unless (copy($self->_abs_local($local_file), $self->_abs_remote($newfile)))
751 5 4 unless defined $remote_file
753 1 8 if ($@)
1177 6 46 if (defined $path and $path =~ /^$self->{'mock_server_root'}/)
1188 2 6 unless defined $path
1196 35 9 dirname($remote_path) eq '.' ? :
1206 3 22 if $local_path =~ /^$root/
1208 8 14 dirname($local_path) eq '.' ? :
1224 2 49 if exists $self->{'mock_override'}{'message'}
1242 153 0 defined $self->{'mock_cwd'} ? :
1249 2 0 if $arg eq 'intercept'
1286 260 0 if (grep {$_ eq $method;} @methods)
1290 125 135 if (exists $self->{'mock_override'}{$method}) { }