File Coverage

blib/lib/Test/PONAPI/Repository/MockDB/Table/Comments.pm
Criterion Covered Total %
statement 14 15 93.3
branch 1 2 50.0
condition n/a
subroutine 4 4 100.0
pod 1 1 100.0
total 20 22 90.9


line stmt bran cond sub pod time code
1             # ABSTRACT: mock repository - table - Comments
2             package Test::PONAPI::Repository::MockDB::Table::Comments;
3              
4 8     8   47 use Moose;
  8         20  
  8         63  
5             extends 'Test::PONAPI::Repository::MockDB::Table';
6              
7 8     8   52874 use Test::PONAPI::Repository::MockDB::Table::Relationships;
  8         22  
  8         1313  
8              
9             sub BUILDARGS {
10 9     9 1 26 my $class = shift;
11 9 50       52 my %args = @_ == 1 ? %{ $_[0] } : @_;
  0         0  
12              
13 9         574 my $to_articles =
14             Test::PONAPI::Repository::MockDB::Table::Relationships->new(
15             TYPE => 'articles',
16             TABLE => 'rel_articles_comments',
17             ID_COLUMN => 'id_comments',
18             REL_ID_COLUMN => 'id_articles',
19             COLUMNS => [qw/ id_articles id_comments /],
20             ONE_TO_ONE => 1,
21             );
22              
23 9         84 %args = (
24             TYPE => 'comments',
25             TABLE => 'comments',
26             ID_COLUMN => 'id',
27             COLUMNS => [qw/ id body /],
28             RELATIONS => { articles => $to_articles, },
29             %args,
30             );
31              
32 9         513 return \%args;
33             }
34              
35             __PACKAGE__->meta->make_immutable;
36 8     8   41 no Moose; 1;
  8         19  
  8         45  
37              
38             __END__
39              
40             =pod
41              
42             =encoding UTF-8
43              
44             =head1 NAME
45              
46             Test::PONAPI::Repository::MockDB::Table::Comments - mock repository - table - Comments
47              
48             =head1 VERSION
49              
50             version 0.002005
51              
52             =head1 AUTHORS
53              
54             =over 4
55              
56             =item *
57              
58             Mickey Nasriachi <mickey@cpan.org>
59              
60             =item *
61              
62             Stevan Little <stevan@cpan.org>
63              
64             =item *
65              
66             Brian Fraser <hugmeir@cpan.org>
67              
68             =back
69              
70             =head1 COPYRIGHT AND LICENSE
71              
72             This software is copyright (c) 2016 by Mickey Nasriachi, Stevan Little, Brian Fraser.
73              
74             This is free software; you can redistribute it and/or modify it under
75             the same terms as the Perl 5 programming language system itself.
76              
77             =cut