use strict; use warnings; use Test::More tests => 2; use HTML::FormFu; my $form = HTML::FormFu->new({ tt_args => { INCLUDE_PATH => 'share/templates/tt/xhtml' } }); $form->auto_fieldset(1); my $block = $form->element( { type => 'Block', tag => 'span', content => 'Hello !', } ); $block->element( { name => "foo" } ); # because there's a content(), the block's elements should be ignored my $block_xhtml = qq{ Hello <World>! }; is( $block, $block_xhtml ); my $form_xhtml = <
$block_xhtml
EOF is( $form, $form_xhtml );