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   50 use v5.12.5;
  3         10  
8 3     3   21 use warnings;
  3         5  
  3         160  
9              
10             our $VERSION = '1.14.2.3'; # TRIAL VERSION
11              
12 3     3   22 use Rex::Interface::Connection::Base;
  3         6  
  3         19  
13              
14 3     3   89 use base qw(Rex::Interface::Connection::Base);
  3         11  
  3         918  
15              
16             sub new {
17 4     4 0 16 my $that = shift;
18 4   33     25 my $proto = ref($that) || $that;
19 4         26 my $self = $that->SUPER::new(@_);
20              
21 4         10 bless( $self, $proto );
22              
23 4         25 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 7 sub get_connection_object { my ($self) = @_; return $self; }
  3         23  
35 0     0 0 0 sub get_fs_connection_object { my ($self) = @_; return $self; }
  0         0  
36 4     4 0 20 sub is_connected { return 1; }
37 3     3 0 10 sub is_authenticated { return 1; }
38              
39 11     11 0 38 sub get_connection_type { return "Local"; }
40              
41             1;