test1.pl untested

filter: Statementstmt 0.0% 0 / 26 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 0.0% 0 / 3 Podpod n/a totaltotal 0.0% 0 / 29 CC 1 SCAR 6.9
CC
1
Cov
0%
BEGIN
2.0
BEGIN
2.0
BEGIN
2.0
CRAP 2.0
1  
2 use strict;
3 use warnings;
4 use Test::More;
5  
6 use_ok 'HTML::TurboForm';
7  
8 { # new() - fails as a hashref is required
9 my $form = HTML::TurboForm->new();
10 $form->add_element({ type => "Text", name => 'query' });
11 $form->populate({ query => 'Question' });
12 is $form->get_value('query'), 'Question', " .. new(), .. get_value('query')";
13 }
14 { # new( {} ) - ok
15 my $form = HTML::TurboForm->new({}); # a hashref is required
16 $form->add_element({ type => "Text", name => 'query' });
17 $form->populate({ query => 'Question' });
18 is $form->get_value('query'), 'Question', " .. new({}), .. get_value('query')";
19 }
20 done_testing;