Branch Coverage

blib/lib/Test/Net/LDAP/Mock/Data.pm
Criterion Covered Total %
branch 137 170 80.5


line true false branch
61 0 159 if (@_) { }
73 0 215 if (@_) { }
91 1 0 if (@_) { }
96 0 1 if ($_[0] and blessed($_[0]) and $_[0]->isa('Net::LDAP::Entry')) { }
100 0 0 unless ($new_entry->isa('Net::LDAP::RootDSE'))
107 1 0 unless ($new_entry->get_value('objectClass'))
124 18 2 if (@_)
129 0 20 wantarray ? :
134 0 6 unless my $dn = shift()
136 2 4 if (@_) { }
142 2 2 unless my $node = $self->root->get_node($dn)
152 29 27 if (@$attrs) { }
183 4 26 if ($$self{'password_mocked'} and exists $$arg{'password'})
186 1 3 unless (defined $dn)
190 0 3 unless $dn = ldap_explode_dn($dn, 'casefold', 'lower')
193 1 2 unless my $node = $self->root->get_node($dn)
196 1 1 unless (defined $node->password and defined $$arg{'password'} and $node->password eq $$arg{'password'})
202 9 18 if (my $code = $$self{'mock_bind_code'})
205 3 6 if (ref $code eq 'CODE')
211 4 5 if (blessed $code)
216 8 1 if ($code != '0')
221 1 18 if (my $callback = $$arg{'callback'})
233 1 1 if (my $callback = $$arg{'callback'})
245 1 1 if (my $callback = $$arg{'callback'})
263 1 49 unless ($base)
269 37 12 if (defined $filter and not ref $filter and $filter ne '') { }
272 1 36 unless ($f->parse($filter))
283 2 46 unless (defined $scope)
291 46 0 $base ? :
293 3 43 unless ($base_node)
297 1 42 if $callback
304 56 11 if ($entry and !$filter || $filter->match($entry, $schema))
307 2 54 if $callback
319 0 8 ref $$arg{'dn'} ? :
321 1 7 unless ($dn)
327 2 5 unless ($dn_list)
331 0 0 exists $$arg{'attrs'} ? :
5 0 exists $$arg{'attr'} ? :
337 0 0 exists $$arg{'attrs'} ? :
5 0 exists $$arg{'value'} ? :
345 0 5 unless ($node and $node->entry)
358 3 2 $filter->match($entry, $self->schema) ? :
361 1 4 if (my $callback = $$arg{'callback'})
373 0 39 ref $$arg{'dn'} ? :
375 1 38 unless ($dn)
381 2 36 unless ($dn_list)
387 2 34 if ($node->entry)
393 0 34 if (ref $$arg{'dn'}) { }
396 23 11 unless $$arg{'attrs'} or $$arg{'attr'}
402 34 0 if (my $rdn = $$dn_list[0])
410 1 33 if (my $callback = $$arg{'callback'})
424 0 19 ref $$arg{'dn'} ? :
426 1 18 unless ($dn)
432 2 16 unless ($dn_list)
438 2 14 unless ($node and $node->entry)
444 2 12 if (exists $$arg{'changes'}) { }
449 1 3 unless (defined $opcode{$op})
457 37 11 unless my $chg = $$arg{$op}
461 2 9 if ($opcode == 3) { }
5 4 elsif ($ref_chg eq 'HASH') { }
4 0 elsif ($ref_chg eq 'ARRAY') { }
0 0 elsif (not $ref_chg) { }
463 1 1 if ($ref_chg eq 'HASH') { }
1 0 elsif ($ref_chg eq 'ARRAY') { }
0 0 elsif (not $ref_chg) { }
474 0 2 unless defined $incr
488 1 3 if ($opcode == 1) { }
500 2 11 if (my $callback = $$arg{'callback'})
512 0 8 ref $$arg{'dn'} ? :
514 1 7 unless ($dn)
520 2 5 unless ($dn_list)
526 1 4 unless ($node and $node->entry)
532 1 3 if (my $callback = $$arg{'callback'})
544 0 12 ref $$arg{'dn'} ? :
546 1 11 unless ($dn)
552 2 9 unless ($dn_list)
559 1 8 unless ($old_node and $old_node->entry)
567 7 1 if (defined(my $new_rdn_value = $$arg{'newrdn'})) { }
570 1 6 unless ($new_rdn_list)
581 4 3 if (defined(my $new_superior = $$arg{'newsuperior'})) { }
584 1 3 unless ($dn_list)
598 2 4 if ($new_node->entry)
608 3 1 if ($rdn_changed)
609 2 1 if ($$arg{'deleteoldrdn'})
619 0 4 if (my $callback = $$arg{'callback'})