File Coverage

lib/Rex/Interface/Connection/Fake.pm
Criterion Covered Total %
statement 23 25 92.0
branch n/a
condition 1 3 33.3
subroutine 11 13 84.6
pod 0 9 0.0
total 35 50 70.0


line stmt bran cond sub pod time code
1             #
2             # (c) Jan Gehring
3             #
4              
5             package Rex::Interface::Connection::Fake;
6              
7 3     3   41 use v5.12.5;
  3         11  
8 3     3   17 use warnings;
  3         7  
  3         156  
9              
10             our $VERSION = '1.14.2.2'; # TRIAL VERSION
11              
12 3     3   20 use Rex::Interface::Connection::Base;
  3         8  
  3         21  
13              
14 3     3   99 use base qw(Rex::Interface::Connection::Base);
  3         7  
  3         980  
15              
16             sub new {
17 4     4 0 14 my $that = shift;
18 4   33     27 my $proto = ref($that) || $that;
19 4         27 my $self = $that->SUPER::new(@_);
20              
21 4         9 bless( $self, $proto );
22              
23 4         24 return $self;
24             }
25              
26       0 0   sub error { }
27              
28             sub connect {
29 3     3 0 17 my ( $self, %option ) = @_;
30 3         11 $self->{server} = $option{server};
31             }
32              
33       2 0   sub disconnect { }
34 3     3 0 8 sub get_connection_object { my ($self) = @_; return $self; }
  3         21  
35 0     0 0 0 sub get_fs_connection_object { my ($self) = @_; return $self; }
  0         0  
36 4     4 0 18 sub is_connected { return 1; }
37 3     3 0 8 sub is_authenticated { return 1; }
38              
39 9     9 0 25 sub get_connection_type { return "Local"; }
40              
41             1;