File Coverage

blib/lib/Renard/Incunabula/Document/Devel/TestHelper.pm
Criterion Covered Total %
statement 15 15 100.0
branch 1 2 50.0
condition n/a
subroutine 3 3 100.0
pod 1 1 100.0
total 20 21 95.2


line stmt bran cond sub pod time code
1 1     1   129941 use Renard::Incunabula::Common::Setup;
  1         150281  
  1         5  
2             package Renard::Incunabula::Document::Devel::TestHelper;
3             # ABSTRACT: A helper library for document tests
4             $Renard::Incunabula::Document::Devel::TestHelper::VERSION = '0.005';
5 1     1   6686 use Moo;
  1         3356  
  1         4  
6              
7 1 50   1 1 1403 classmethod create_null_document( :$repeat = 1 ) {
  1         3  
  1         4  
  1         2  
  1         2  
8 1         1034 require Renard::Incunabula::Document::Null;
9 1         946 require Renard::Incunabula::Page::Null;
10              
11             my $null_doc = Renard::Incunabula::Document::Null->new(
12             pages => [
13             map {
14 1         6 Renard::Incunabula::Page::Null->new;
  4         60  
15             } 0..$repeat*4-1
16             ],
17             );
18             }
19              
20              
21             1;
22              
23             __END__
24              
25             =pod
26              
27             =encoding UTF-8
28              
29             =head1 NAME
30              
31             Renard::Incunabula::Document::Devel::TestHelper - A helper library for document tests
32              
33             =head1 VERSION
34              
35             version 0.005
36              
37             =head1 EXTENDS
38              
39             =over 4
40              
41             =item * L<Moo::Object>
42              
43             =back
44              
45             =head1 CLASS METHODS
46              
47             =head2 create_null_document
48              
49             Renard::Incunabula::Document::Devel::TestHelper->create_null_document
50              
51             Returns a L<Renard::Incunabula::Document::Null> which can be used for testing.
52              
53             =head1 AUTHOR
54              
55             Project Renard
56              
57             =head1 COPYRIGHT AND LICENSE
58              
59             This software is copyright (c) 2017 by Project Renard.
60              
61             This is free software; you can redistribute it and/or modify it under
62             the same terms as the Perl 5 programming language system itself.
63              
64             =cut