3 # This module tests the HtmlTag filter
9 use Test
::More tests
=> 4;
11 BEGIN { use_ok
('Koha::Template::Plugin::HtmlTags'); }
13 my $filter = Koha
::Template
::Plugin
::HtmlTags
->new();
14 ok
($filter, "new()");
18 my $expected = '<h1>TEST</h1>';
19 my $created = $filter->filter('TEST','', {tag
=> 'h1'} );
20 is
( $created, $expected, "Testing simple tag works: $expected - $created");
22 # Test tag with attributes
23 $expected = '<h1 class="MYCLASS" title="MYTITLE">TEST</h1>';
24 $created = $filter->filter('TEST','', {tag
=> 'h1', attributes
=> 'class="MYCLASS" title="MYTITLE"'} );
25 is
($created, $expected, "Testing tag with attributes works: $expected - $created");