2 use warnings FATAL => 'all';
3 use Test::More 'no_plan';
19 my $output = HTML::Zoom
20 ->from_html($template)
21 ->apply_if(1, sub { $_->select('body')->replace_content('Hello') })
24 is( $output => $expect, 'apply_if with a true predicate' );
27 ->from_html($template)
28 ->apply_if(0, sub { $_->select('body')->replace_content('Hello') })
31 is( $output => $template, 'apply_if with a false predicate' );