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   44 use v5.12.5;
  3         18  
8 3     3   23 use warnings;
  3         8  
  3         163  
9              
10             our $VERSION = '1.14.3'; # VERSION
11              
12 3     3   57 use Rex::Interface::Connection::Base;
  3         9  
  3         29  
13              
14 3     3   88 use base qw(Rex::Interface::Connection::Base);
  3         15  
  3         1012  
15              
16             sub new {
17 4     4 0 14 my $that = shift;
18 4   33     28 my $proto = ref($that) || $that;
19 4         34 my $self = $that->SUPER::new(@_);
20              
21 4         9 bless( $self, $proto );
22              
23 4         23 return $self;
24             }
25              
26       0 0   sub error { }
27              
28             sub connect {
29 3     3 0 17 my ( $self, %option ) = @_;
30 3         12 $self->{server} = $option{server};
31             }
32              
33       2 0   sub disconnect { }
34 3     3 0 5 sub get_connection_object { my ($self) = @_; return $self; }
  3         20  
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 11 sub is_authenticated { return 1; }
38              
39 11     11 0 54 sub get_connection_type { return "Local"; }
40              
41             1;