Condition Coverage

blib/lib/Mojolicious/Plugin/StripePayment.pm
Criterion Covered Total %
condition 35 78 44.8


and 3 conditions

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

or 2 conditions

line l !l condition
115 0 3 $ENV{'MOJO_STRIPE_DEBUG'} || 0
346 0 8 $c->param('description') || ''
394 5 0 $c->param('capture') // 1
396 0 5 $c->param('description') || ''
443 0 0 $$args{'id'} || 'invalid'
453 1 6 $tx->error || {}
454 7 0 $tx->res->json || {}
461 1 0 $type || 'Unknown'
1 0 $message || 'Could not find any error message.'

or 3 conditions

line l !l&&r !l&&!r condition
344 0 7 1 $form{'amount'} ||= $c->param('amount')
345 0 8 0 $form{'currency'} ||= $self->currency_code
348 0 2 0 $form{'receipt_email'} ||= $c->param('stripeEmail')
350 0 6 2 $$args{'token'} || $c->param('stripeToken')
0 6 2 $form{'source'} ||= $$args{'token'} || $c->param('stripeToken')
351 1 7 0 $form{'capture'} // $self->auto_capture
393 0 5 0 local $$MOCKED_RESPONSE{'json'}{'amount'} //= $c->param('amount')
394 0 5 0 local $$MOCKED_RESPONSE{'json'}{'captured'} //= $c->param('capture') // 1 ? \1 : \0
395 0 5 0 local $$MOCKED_RESPONSE{'json'}{'currency'} //= lc $c->param('currency')
396 0 0 5 local $$MOCKED_RESPONSE{'json'}{'description'} //= $c->param('description') || ''
397 0 5 0 local $$MOCKED_RESPONSE{'json'}{'livemode'} //= $secret =~ /test/ ? \0 : \1
398 0 2 3 local $$MOCKED_RESPONSE{'json'}{'receipt_email'} //= $c->param('receipt_email')
410 0 0 1 local $$MOCKED_RESPONSE{'json'}{'amount'} //= $c->param('amount')
412 0 1 0 local $$MOCKED_RESPONSE{'json'}{'livemode'} //= $secret =~ /test/ ? \0 : \1
413 0 0 1 local $$MOCKED_RESPONSE{'json'}{'receipt_email'} //= $c->param('receipt_email')
457 1 0 6 $$error{'code'} or $$json{'error'}
458 1 0 0 $$json{'error'}{'message'} || $$json{'error'}{'type'} || $$error{'message'}
459 1 0 0 $$json{'error'}{'param'} || $$json{'error'}{'code'} || $$error{'code'}