Bugzilla – Attachment 64416 Details for
Bug 18665
Translatability: Add tt filter to allow html tags inside tt directives
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 18665: Add test for HtmlTags.pm
Bug-18665-Add-test-for-HtmlTagspm.patch (text/plain), 1.40 KB, created by
Brendan Gallagher
on 2017-06-16 19:20:10 UTC
(
hide
)
Description:
Bug 18665: Add test for HtmlTags.pm
Filename:
MIME Type:
Creator:
Brendan Gallagher
Created:
2017-06-16 19:20:10 UTC
Size:
1.40 KB
patch
obsolete
>From 17ef69fdbb563770057b0cea7a4d8be28066a94b Mon Sep 17 00:00:00 2001 >From: =?UTF-8?q?Marc=20V=C3=A9ron?= <veron@veron.ch> >Date: Thu, 25 May 2017 21:52:09 +0200 >Subject: [PATCH] Bug 18665: Add test for HtmlTags.pm > >This patch adds tests for the tt filter HtmlTags.pm > >To test: prove -v t/HtmlTags.t should pass > >Signed-off-by: Alex Buckley <alexbuckley@catalyst.net.nz> > >Signed-off-by: Brendan A Gallagher <brendan@bywatersolutions.com> >--- > t/HtmlTags.t | 25 +++++++++++++++++++++++++ > 1 file changed, 25 insertions(+) > create mode 100755 t/HtmlTags.t > >diff --git a/t/HtmlTags.t b/t/HtmlTags.t >new file mode 100755 >index 0000000..3746d2c >--- /dev/null >+++ b/t/HtmlTags.t >@@ -0,0 +1,25 @@ >+#!/usr/bin/perl >+# >+# This module tests the HtmlTag filter >+# >+ >+use strict; >+use warnings; >+ >+use Test::More tests => 4; >+ >+BEGIN { use_ok('Koha::Template::Plugin::HtmlTags'); } >+ >+my $filter = Koha::Template::Plugin::HtmlTags->new(); >+ok ($filter, "new()"); >+ >+ >+# Test simple tag >+my $expected = '<h1>TEST</h1>'; >+my $created = $filter->filter('TEST','', {tag => 'h1'} ); >+is( $created, $expected, "Testing simple tag works: $expected - $created"); >+ >+# Test tag with attributes >+$expected = '<h1 class="MYCLASS" title="MYTITLE">TEST</h1>'; >+$created = $filter->filter('TEST','', {tag => 'h1', attributes => 'class="MYCLASS" title="MYTITLE"'} ); >+is($created, $expected, "Testing tag with attributes works: $expected - $created"); >-- >2.1.4
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 18665
:
63697
|
63721
|
63754
|
63765
|
63766
|
64415
| 64416