File Coverage

blib/lib/Test/Mockify/MethodSpy.pm
Criterion Covered Total %
statement 16 16 100.0
branch n/a
condition n/a
subroutine 3 3 100.0
pod 0 1 0.0
total 19 20 95.0


line stmt bran cond sub pod time code
1             package Test::Mockify::MethodSpy;
2              
3 5     5   17836 use parent 'Test::Mockify::Method';
  5         237  
  5         29  
4              
5             #---------------------------------------------------------------------
6             sub new {
7 17     17 0 743     my $class = shift;
8 17         14     my ($OriginalMethodPointer) = @_;
9 17         57     my $self = $class->SUPER::new();
10 17         22     $self->{'OriginalMethodPointer'} = $OriginalMethodPointer;
11 17         38     return $self;
12             }
13             #---------------------------------------------------------------------
14             sub _addToTypeStore {
15 17     17   17     my $self = shift;
16 17         18     my ($Signature, $NewExpectedParameters) = @_;
17 17         27     my $SignatureKey = join('',@$Signature);
18 17         51     my $Parameter = Test::Mockify::Parameter->new($NewExpectedParameters);
19 17         35     $Parameter->buildReturn()->thenCall($self->{'OriginalMethodPointer'});
20 17         15     push(@{$self->{'TypeStore'}{$SignatureKey}}, $Parameter );
  17         33  
21 17         39     return;
22             }
23              
24             1;