Mockify/MethodSpy.pm

filter: Statementstmt 100% 24 / 24 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 100% 5 / 5 Podpod 0.0% 0 / 1 totaltotal 96.6% 29 / 30 CC 1 SCAR 0.0
CC
1
Cov
100%
BEGIN
1.0
BEGIN
1.0
BEGIN
1.0
CRAP 1.0
« Mockify/MethodCallCounter.pm ↑ Summary
1 package Test::Mockify::MethodSpy;
2  
3 18 ▶use parent 'Test::Mockify::Method';
Subroutine BEGIN: called CC=1 SCAR=0.0
4 18 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
5 18 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
6  
7 #---------------------------------------------------------------------
8 27 ▶sub new {
Subroutine new: called CC=1 SCAR=0.0
Pod undocumented
9 27 my $class = shift;
10 27 my ($OriginalMethodPointer) = @_;
11 27 my $self = $class->SUPER::new();
12 27 $self->{'OriginalMethodPointer'} = $OriginalMethodPointer;
13 27 return $self;
14 }
15 #---------------------------------------------------------------------
16 27 ▶sub _addToTypeStore { ## no critic (Private subroutine/method) used in chaining
Subroutine _addToTypeStore: called CC=1 SCAR=0.0
17 27 my $self = shift;
18 27 my ($Signature, $NewExpectedParameters) = @_;
19 27 my $SignatureKey = join('',@{$Signature});
20 27 my $Parameter = Test::Mockify::Parameter->new($NewExpectedParameters);
21 27 $Parameter->buildReturn()->thenCall($self->{'OriginalMethodPointer'});
22 27 push(@{$self->{'TypeStore'}{$SignatureKey}}, $Parameter );
23 27 return;
24 }
25 18 1;
« Mockify/MethodCallCounter.pm ↑ Summary