Branch Coverage

blib/lib/Dancer2/Test.pm
Criterion Covered Total %
branch 64 106 60.3


line true false branch
59 0 39 unless $NO_WARN
65 8 31 if ref $_[0] eq "Dancer2::Core::Response"
67 8 23 ref $_[0] eq 'Dancer2::Core::Request' ? :
101 10 11 XXX ? :
7 21 @_ > 1 ? :
117 3 25 if (defined $options->{'params'})
120 2 1 if (XXX) { }
137 0 28 if exists $options->{'body'}
140 2 26 if ($options->{'headers'})
144 2 2 if ($name =~ /^cookie$/i)
151 2 26 if ($options->{'files'})
157 1 1 if ($file->{'data'}) { }
182 0 28 if ($options->{'content_type'})
205 0 10 if (my $params = $request->{'_query_params'})
208 0 0 if (XXX) { }
229 0 4 unless $NO_WARN
242 2 5 ref $_[0] eq 'Dancer2::Core::Request' ? :
249 3 0 if ($route->match($request))
258 0 3 unless $NO_WARN
267 0 4 unless $NO_WARN
278 0 4 unless $NO_WARN
302 8 8 if (@_ == 3)
318 0 4 unless $NO_WARN
325 0 4 unless $NO_WARN
332 0 4 unless $NO_WARN
339 0 4 unless $NO_WARN
347 0 0 unless $NO_WARN
358 0 0 unless $NO_WARN
370 0 0 unless $NO_WARN
385 0 4 unless $NO_WARN
393 0 4 if not $tb->ok(_include_in_headers($response->[1], $expected), $test_name)
417 6 10 if $method eq "head"
422 2 0 if @$available_routes
430 2 0 if ($file) { }
444 20 360 unless XXX
446 90 1050 if XXX
454 34 326 if ($pod_string =~ /^$app_string$/)
459 0 10 unless ($found_routes->{$app_string})
467 0 2 if (@$undocumented_routes) { }
0 4 elsif (not $$all_routes{$app->name}{'has_pod'} and @{$$all_routes{$app->name}{'routes'};}) { }
513 1 1 if (ref $options{'apps'} eq ref []) { }
520 1 0 if $caller->can("dancer_app")
540 5 5 XXX ? :
5 10 ref $req eq 'Dancer2::Core::Request' ? :
5 15 ref $req eq 'Dancer2::Core::Response' ? :
547 0 0 XXX ? :
563 0 0 unless $Dancer2::Test::a->[0] cmp $Dancer2::Test::b->[0]
577 0 4 unless _check_header($full_headers, $name, $value)
589 4 0 if $name eq $key and $value eq $val
598 0 0 if ref $req eq "Dancer2::Core::Response"
600 0 0 XXX ? :
606 39 0 if scalar @{$_dispatcher->apps;}
610 0 0 unless $caller and $caller->can("dancer_app")