Condition Coverage

blib/lib/Mojolicious/Plugin/StripePayment.pm
Criterion Covered Total %
condition 36 81 44.4


and 3 conditions

line !l l&&!r l&&r condition
319 1 0 0 defined $form{'statement_descriptor'} and 22 < length $form{'statement_descriptor'}
353 9 0 0 defined $form{'statement_descriptor'} and 22 < length $form{'statement_descriptor'}

or 2 conditions

line l !l condition
115 0 4 $ENV{'MOJO_STRIPE_DEBUG'} || 0
345 0 9 $c->param('description') || ''
403 5 0 $c->param('capture') // 1
405 0 5 $c->param('description') || ''
453 0 0 $$args{'id'} || 'invalid'
463 1 7 $tx->error || {}
464 8 0 $tx->res->json || {}
471 1 0 $type || 'Unknown'
1 0 $message || 'Could not find any error message.'

or 3 conditions

line l !l&&r !l&&!r condition
343 0 8 1 $form{'amount'} ||= $c->param('amount')
344 0 9 0 $form{'currency'} ||= $self->currency_code
346 0 2 0 $form{'receipt_email'} ||= $c->param('stripeEmail')
347 0 7 2 $$args{'token'} || $c->param('stripeToken')
0 7 2 $form{'source'} ||= $$args{'token'} || $c->param('stripeToken')
348 1 8 0 $form{'capture'} // $self->auto_capture
402 0 5 0 local $$MOCKED_RESPONSE{'json'}{'amount'} //= $c->param('amount')
403 0 5 0 local $$MOCKED_RESPONSE{'json'}{'captured'} //= $c->param('capture') // 1 ? \1 : \0
404 0 5 0 local $$MOCKED_RESPONSE{'json'}{'currency'} //= lc $c->param('currency')
405 0 0 5 local $$MOCKED_RESPONSE{'json'}{'description'} //= $c->param('description') || ''
406 0 5 0 local $$MOCKED_RESPONSE{'json'}{'livemode'} //= $secret =~ /test/ ? \0 : \1
407 0 5 0 local $$MOCKED_RESPONSE{'json'}{'metadata'} //= &$metadata($c)
408 0 2 3 local $$MOCKED_RESPONSE{'json'}{'receipt_email'} //= $c->param('receipt_email')
420 0 0 1 local $$MOCKED_RESPONSE{'json'}{'amount'} //= $c->param('amount')
422 0 1 0 local $$MOCKED_RESPONSE{'json'}{'livemode'} //= $secret =~ /test/ ? \0 : \1
423 0 0 1 local $$MOCKED_RESPONSE{'json'}{'receipt_email'} //= $c->param('receipt_email')
467 1 0 7 $$error{'code'} or $$json{'error'}
468 1 0 0 $$json{'error'}{'message'} || $$json{'error'}{'type'} || $$error{'message'}
469 1 0 0 $$json{'error'}{'param'} || $$json{'error'}{'code'} || $$error{'code'}