use strict; use warnings; use Test::More tests => 2; use HTML::Widget; use lib 't/lib'; use HTMLWidget::TestLib; my $w = HTML::Widget->new->explicit_ids(1); $w->element( 'Textfield', 'foo' ); $w->element( 'Textfield', 'bar' )->attributes->{id} = 'my_bar'; # Without query { my $f = $w->process; is( "$f", <
EOF } # With mocked basic query { my $query = HTMLWidget::TestLib->mock_query( { foo => 'yada', bar => '23', } ); # Add an id to the top-level widget too $w->attributes->{id} = 'my_form'; my $f = $w->process($query); is( "$f", <
EOF }