Branch Coverage

blib/lib/Test/Mock/Net/FTP.pm
Criterion Covered Total %
branch 77 82 93.9


line true false branch
196 1 249 unless exists $mock_server{$host}
215 247 2 !((defined $opts{'Passive'} || defined $opts{'Port'}) && !$opts{'Passive'}) ? :
216 1 1 defined $opts{'Port'} ? :
247 2 $connection_mode eq 'pasv' ? :
232 249 1 if ($self->_mock_login_auth($user, $pass))
237 247 2 if defined $$dir[0]
252 1 249 unless defined $server_user
352 1 1 unless (rename $self->_abs_remote($oldname), $self->_abs_remote($newname))
375 1 1 unless (unlink $self->_abs_remote($filename))
398 5 27 unless (defined $dirs)
454 3 34 if ($dir eq '..') { }
466 1 35 unless (-d $self->mock_pwd)
509 2 2 if (not !$recursive_bool) { }
510 1 1 unless (remove_tree($self->_abs_remote($dirname)))
516 1 1 unless (rmdir $self->_abs_remote($dirname))
539 2 3 if (not !$recursive_bool) { }
540 1 1 unless (make_path($self->_abs_remote($dirname)))
546 1 2 unless (mkdir $self->_abs_remote($dirname))
590 3 1 defined $dir ? :
592 3 1 if wantarray
599 0 4 unless opendir my $dh, $target_dir
625 3 1 if wantarray
645 4 1 unless defined $local_file
646 1 4 unless (copy($self->_abs_remote($remote_file), $self->_abs_local($local_file)))
672 7 2 unless defined $remote_file
673 1 8 unless (copy($self->_abs_local($local_file), $self->_abs_remote($remote_file)))
697 2 1 unless -e $self->_abs_remote($newfile)
712 2 0 unless defined $remote_file
715 1 1 unless (copy($self->_abs_local($local_file), $self->_abs_remote($newfile)))
742 5 4 unless defined $remote_file
744 1 8 if ($@)
1168 6 46 if (defined $path and $path =~ /^$$self{'mock_server_root'}/)
1179 2 6 unless defined $path
1187 35 9 dirname($remote_path) eq '.' ? :
1197 3 22 if $local_path =~ /^$root/
1199 8 14 dirname($local_path) eq '.' ? :
1215 2 49 if exists $$self{'mock_override'}{'message'}
1233 140 0 defined $$self{'mock_cwd'} ? :
1240 2 0 if $arg eq 'intercept'
1277 255 0 if (grep {$_ eq $method;} @methods)
1281 125 130 if (exists $$self{'mock_override'}{$method}) { }