Branch Coverage

blib/lib/Dancer2/Test.pm
Criterion Covered Total %
branch 60 106 56.6


line true false branch
60 0 35 unless $NO_WARN
66 7 28 if ref $_[0] eq "Dancer2::Core::Response"
68 7 21 ref $_[0] eq 'Dancer2::Core::Request' ? :
103 9 10 is_arrayref($_[0]) ? :
7 19 @_ > 1 ? :
119 3 23 if (defined $options->{'params'})
122 2 1 if (is_arrayref($value)) { }
139 0 26 if exists $options->{'body'}
142 2 24 if ($options->{'headers'})
146 2 2 if ($name =~ /^cookie$/i)
153 2 24 if ($options->{'files'})
159 1 1 if ($file->{'data'}) { }
184 0 26 if ($options->{'content_type'})
207 0 9 if (my $params = $request->{'_query_params'})
210 0 0 if (is_arrayref($value)) { }
231 0 4 unless $NO_WARN
244 2 5 ref $_[0] eq 'Dancer2::Core::Request' ? :
251 3 0 if ($route->match($request))
260 0 3 unless $NO_WARN
269 0 4 unless $NO_WARN
280 0 4 unless $NO_WARN
304 8 8 if (@_ == 3)
320 0 4 unless $NO_WARN
327 0 4 unless $NO_WARN
334 0 4 unless $NO_WARN
341 0 4 unless $NO_WARN
349 0 0 unless $NO_WARN
360 0 0 unless $NO_WARN
372 0 0 unless $NO_WARN
387 0 0 unless $NO_WARN
395 0 0 if not $tb->ok(_include_in_headers($response->[1], $expected), $test_name)
419 6 10 if $method eq "head"
424 2 0 if @$available_routes
432 2 0 if ($file) { }
446 20 360 unless is_arrayref($pod_part)
448 90 1050 if is_arrayref($ref_part)
456 34 326 if ($pod_string =~ /^$app_string$/)
461 0 10 unless ($found_routes->{$app_string})
469 0 2 if (@$undocumented_routes) { }
0 4 elsif (not $$all_routes{$app->name}{'has_pod'} and @{$$all_routes{$app->name}{'routes'};}) { }
515 1 1 if (ref $options{'apps'} eq ref []) { }
522 1 0 if $caller->can("dancer_app")
542 4 4 is_arrayref($req) ? :
4 8 ref $req eq 'Dancer2::Core::Request' ? :
4 12 ref $req eq 'Dancer2::Core::Response' ? :
549 0 0 is_arrayref($req) ? :
565 0 0 unless $Dancer2::Test::a->[0] cmp $Dancer2::Test::b->[0]
579 0 0 unless _check_header($full_headers, $name, $value)
591 0 0 if $name eq $key and $value eq $val
600 0 0 if ref $req eq "Dancer2::Core::Response"
602 0 0 is_arrayref($req) ? :
608 35 0 if scalar @{$_dispatcher->apps;}
612 0 0 unless $caller and $caller->can("dancer_app")