WebSocket/Role/WebSocketResult.pm

filter: Statementstmt 84.6% 11 / 13 Branchbran n/a Conditioncond 0.0% 0 / 2 MC/DCmcdc 0.0% 0 / 1 Subroutinesub 75.0% 3 / 4 Podpod 100% 1 / 1 totaltotal 71.4% 15 / 21 CC 2 SCAR 11.0
CC
2
Cov
73%
response_payload
6.0
BEGIN
1.0
BEGIN
1.0
CRAP 3.0
« WebSocket.pm ↑ Summary WebSocket/Response.pm »
1 1 ▶use v5.10.0;
Subroutine BEGIN: called CC=1 SCAR=0.0
2 1 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
3  
4 package JMAP::Tester::WebSocket::Role::WebSocketResult 0.006;
5 # ABSTRACT: the kind of thing that you get back for a WebSocket request
6  
7 1 ▶use Moo::Role;
Subroutine BEGIN: called CC=1 SCAR=0.0
8  
9 1 with 'JMAP::Tester::Role::Result';
10  
11 #pod =head1 OVERVIEW
12 #pod
13 #pod This is the role consumed by the class of any object returned by
14 #pod L<JMAP::Tester::WebSocket>'s C<request> method.
15 #pod
16 #pod =cut
17  
18 1 has ws_response => (
19 is => 'ro',
20 );
21  
22 #pod =method response_payload
23 #pod
24 #pod Returns the raw payload of the response, if there is one. Empty string
25 #pod otherwise.
26 #pod
27 #pod =cut
28  
29 0 ▶sub response_payload {
Subroutine response_payload: not called CC=2 SCAR=17.9
Pod documented
30 0 my ($self) = @_;
31  
32 0 ▶ return $self->ws_response || '';
Condition0%0/2
$self->ws_response || ''
l!l
00
MC/DC0%0/1
$self->ws_response || ''
$self->ws_response
Truth table0%0/2
A
A= $self->ws_response
Aresult
11
00
33 }
34  
35 1 1;
36  
37 __END__
« WebSocket.pm ↑ Summary WebSocket/Response.pm »