Bug 19186: (QA follow-up) Insert syspref SelfCheckoutByLogin if missing
[koha.git] / t / HtmlTags.t
blob3746d2c8c24e47c5741a37c274e3713c07de8462
1 #!/usr/bin/perl
3 # This module tests the HtmlTag filter
6 use strict;
7 use warnings;
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()");
17 # Test simple tag
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");