File Coverage

File:blib/lib/Test/Mocha/MethodCall.pm
Coverage:100.0%

linestmtbrancondsubpodtimecode
1package Test::Mocha::MethodCall;
2# ABSTRACT: Objects to represent method calls
3$Test::Mocha::MethodCall::VERSION = '0.61';
4
44
44
44
105
32
816
use strict;
5
44
44
44
92
41
604
use warnings;
6
44
44
44
83
29
168
use parent 'Test::Mocha::Method';
7
8sub new {
9    # uncoverable pod
10
1037
0
1797
    my ( $class, %args ) = @_;
11    # caller should be an arrayref tuple [file, line]
12    ### assert: defined $args{invocant}
13    ### assert: defined $args{caller}
14    ### assert: ref $args{caller} eq 'ARRAY' && @{$args{caller}} == 2
15
1037
2405
    return $class->SUPER::new(%args);
16}
17
18sub invocant {
19    # uncoverable pod
20
1022
0
1158
    return $_[0]->{invocant};
21}
22
23sub caller {  ## no critic (ProhibitBuiltinHomonyms)
24                                  # uncoverable pod
25
174
174
0
105
569
    return @{ $_[0]->{caller} };  # ($file, $line)
26}
27
28sub stringify_long {
29    # uncoverable pod
30
170
0
2956
    my ($self) = @_;
31
170
259
    return sprintf '%s called at %s line %d',
32      $self->SUPER::stringify, $self->caller;
33}
34
351;