Proto/TestCase.pm

filter: Statementstmt 100% 22 / 22 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 100% 7 / 7 Podpod n/a totaltotal 100% 29 / 29 CC 1 SCAR 0.0
CC
1
Cov
100%
BEGIN
1.0
BEGIN
1.0
BEGIN
1.0
CRAP 1.0
« Proto/HashRef.pm ↑ Summary
1 package Test::Proto::TestCase;
2 14 ▶use 5.008;
Subroutine BEGIN: called CC=1 SCAR=0.0
3 14 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
4 14 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
5 14 ▶use Moo;
Subroutine BEGIN: called CC=1 SCAR=0.0
6 14 with('Test::Proto::Role::Tagged');
7 14 ▶use Test::Proto::Common ();
Subroutine BEGIN: called CC=1 SCAR=0.0
8  
9 =head1 NAME
10  
11 Test::Proto::TestCase - an individual test case
12  
13 =head1 SYNOPSIS
14  
15 Holds attributes to describe the test - the name of the test, the parameters (data) and the code to be executed.
16  
17 All the attributes are chainable when used as setters (they return the TestCase).
18  
19 In addition to those documented below, the TestCase can have tags - see L<Test::Proto::Role::Tagged> for details.
20  
21 =cut
22  
23 =head2 ATTRIBUTES
24  
25 =cut
26  
27 =head3 name
28  
29 Returns the name of the test.
30  
31 =cut
32  
33 3 ▶has 'name' => default => sub { '[Anonymous Test Case]' },
Subroutine __ANON__: called CC=1 SCAR=0.0
34 14 is => 'rw';
35  
36 =head3 code
37  
38 Returns the code.
39  
40 =cut
41  
42 14 has 'code' => is => 'rw';
43  
44 =head3 data
45  
46 Returns the data.
47  
48 =cut
49  
50 has 'data' => is => 'rw',
51 4 ▶ default => sub { {}; };
Subroutine __ANON__: called CC=1 SCAR=0.0
52  
53 14 around qw(name code data) => \&Test::Proto::Common::chainable;
54  
55 14 1;
« Proto/HashRef.pm ↑ Summary