Branch Coverage

blib/lib/OAuth/Lite/Consumer.pm
Criterion Covered Total %
branch 40 92 43.4


line true false branch
272 8 0 unless ($ua)
286 0 8 exists $args{'signature_method'} ? :
294 0 8 unless $signature_method_class->require
305 0 8 unless ('OAuth::Lite::AuthMethod'->validate_method($$self{'auth_method'}))
318 0 8 $args{'use_request_body_hash'} ? :
329 1 2 $$self{'request_token_path'} =~ m[^http(?:s)?\://] ? :
341 1 2 $$self{'access_token_path'} =~ m[^http(?:s)?\://] ? :
352 7 1 $$self{'authorize_path'} =~ m[^http(?:s)?\://] ? :
385 0 5 unless my $url = $args{'url'}
388 3 2 if (defined $args{'token'})
390 2 1 eval { do { $token->isa('OAuth::Lite::Token') } } ? :
409 0 0 unless ($res->is_success)
413 0 0 unless $resp and $resp->token and $resp->token->callback_confirmed
456 0 0 unless ($res->is_success)
460 0 0 unless $token and $token->callback_confirmed
469 0 0 unless my $request_token_url = delete $args{'url'}
531 0 0 unless my $access_token_url = $args{'url'}
535 0 0 defined $args{'token'} ? :
544 0 0 unless ($res->is_success)
596 0 0 unless my $access_token_url = $args{'url'}
598 0 0 defined $args{'token'} ? :
599 0 0 unless defined $token
601 0 0 unless my $verifier = $args{'verifier'}
609 0 0 unless ($res->is_success)
647 1 1 if (ref $extra eq 'ARRAY')
659 0 2 if (defined $headers) { }
660 0 0 if (ref $headers eq 'ARRAY') { }
675 0 2 if not $is_send_data_method and $auth_method eq 'post_body'
678 0 2 if ($auth_method eq 'url_query') { }
0 2 elsif ($auth_method eq 'post_body') { }
679 0 0 if ($is_send_data_method and not $content) { }
683 0 0 if ($is_send_data_method)
684 0 0 if (my $hash = $self->build_body_hash($content))
699 1 4 if $param_key =~ /^x?oauth_/
702 1 1 if (keys %$copied_params > 0)
704 0 1 if ($is_send_data_method and not $content) { }
710 1 1 if ($is_send_data_method)
711 0 1 if (my $hash = $self->build_body_hash($content))
719 1 1 if ($is_send_data_method)
720 1 0 unless $headers->header('Content-Type')
933 2 0 unless $self->oauth_response
935 0 0 unless $authenticate and $authenticate =~ /^\s*OAuth/
1018 4 6 if (defined $token)
1019 3 1 if (eval { do { $token->isa('OAuth::Lite::Token') } }) { }
1028 0 10 if ($$params{'oauth_signature_method'} eq 'PLAINTEXT' and not lc($url) =~ /^https/)
1087 0 1 if ($$self{'use_request_body_hash'})