blib/lib/DBIO/Test/Schema/Artwork_to_Artist.pm

filter: Statementstmt 84.0% 21 / 25 Branchbran n/a Conditioncond 0.0% 0 / 2 MC/DCmcdc 0.0% 0 / 1 Subroutinesub 66.6% 4 / 6 Podpod n/a totaltotal 73.5% 25 / 34 CC 2 SCAR 9.4
CC
2
Cov
78%
__ANON__
6.0
__ANON__
2.0
BEGIN
1.0
CRAP 2.6
« blib/lib/DBIO/DeploymentHandler/HandlesDeploy.pm ↑ Summary blib/lib/DBIO/Moo.pm »
1 package DBIO::Test::Schema::Artwork_to_Artist;
2 # ABSTRACT: Test result class for the artwork_to_artist table
3  
4 256 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
5  
6 256 our $VERSION = '0.900007';
7  
8 256 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
9  
10 256 ▶use base 'DBIO::Test::BaseResult';
Subroutine BEGIN: called CC=1 SCAR=0.0
11 256 ▶use DBIO::Test::Util 'check_customcond_args';
Subroutine BEGIN: called CC=1 SCAR=0.0
12  
13 256 __PACKAGE__->table('artwork_to_artist');
14 256 __PACKAGE__->add_columns(
15 'artwork_cd_id' => {
16 data_type => 'integer',
17 is_foreign_key => 1,
18 },
19 'artist_id' => {
20 data_type => 'integer',
21 is_foreign_key => 1,
22 },
23 );
24 256 __PACKAGE__->set_primary_key(qw/artwork_cd_id artist_id/);
25 256 __PACKAGE__->belongs_to('artwork', 'DBIO::Test::Schema::Artwork', 'artwork_cd_id');
26 256 __PACKAGE__->belongs_to('artist', 'DBIO::Test::Schema::Artist', 'artist_id');
27  
28 __PACKAGE__->belongs_to('artist_test_m2m', 'DBIO::Test::Schema::Artist',
29 0 ▶ sub {
Subroutine __ANON__: not called CC=2 SCAR=17.9
30 # This is for test purposes only. A regular user does not
31 # need to sanity check the passed-in arguments, this is what
32 # the tests are for :)
33 0 my $args = &check_customcond_args;
34  
35 return (
36 { "$args->{foreign_alias}.artistid" => { -ident => "$args->{self_alias}.artist_id" },
37 "$args->{foreign_alias}.rank" => { '<' => 10 },
38 },
39 $args->{self_result_object} && {
40 "$args->{foreign_alias}.artistid" => $args->{self_result_object}->artist_id,
41 0 ▶ "$args->{foreign_alias}.rank" => { '<' => 10 },
Condition0%0/2
$args->{'self_result_object'} && {"$args->{'foreign_alias'}.artistid", $args->{'self_result_object'}->artist_id, "$args->{'foreign_alias'}.rank", {'<', 10}}
!ll
00
MC/DC0%0/1
$args->{'self_result_object'} && {"$args->{'foreign_alias'}.artistid", $args->{'self_result_object'}->artist_id, "$args->{'foreign_alias'}.rank", {'<', 10}}
$args->{'self_result_object'}
Truth table0%0/2
A
A= $args->{'self_result_object'}
Aresult
00
11
42 }
43 );
44 }
45 256 );
46  
47 __PACKAGE__->belongs_to('artist_test_m2m_noopt', 'DBIO::Test::Schema::Artist',
48 0 ▶ sub {
Subroutine __ANON__: not called CC=1 SCAR=6.9
49 # This is for test purposes only. A regular user does not
50 # need to sanity check the passed-in arguments, this is what
51 # the tests are for :)
52 0 my $args = &check_customcond_args;
53  
54 return (
55 0 { "$args->{foreign_alias}.artistid" => { -ident => "$args->{self_alias}.artist_id" },
56 "$args->{foreign_alias}.rank" => { '<' => 10 },
57 }
58 );
59 }
60 256 );
61  
62 256 1;
63  
64 __END__
« blib/lib/DBIO/DeploymentHandler/HandlesDeploy.pm ↑ Summary blib/lib/DBIO/Moo.pm »