Bugzilla – Attachment 59963 Details for
Bug 15969
Allow use of Template Toolkit syntax for Phone Notices
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 15969 - Add unit test of substitution param
Bug-15969---Add-unit-test-of-substitution-param.patch (text/plain), 1.79 KB, created by
Nick Clemens (kidclamp)
on 2017-02-07 00:57:26 UTC
(
hide
)
Description:
Bug 15969 - Add unit test of substitution param
Filename:
MIME Type:
Creator:
Nick Clemens (kidclamp)
Created:
2017-02-07 00:57:26 UTC
Size:
1.79 KB
patch
obsolete
>From 7bf3f935b5add9e57aea98f243820cfa6bc93d15 Mon Sep 17 00:00:00 2001 >From: Kyle M Hall <kyle@bywatersolutions.com> >Date: Fri, 2 Dec 2016 15:52:10 +0000 >Subject: [PATCH] Bug 15969 - Add unit test of substitution param > >Signed-off-by: Nick Clemens <nick@bywatersolutions.com> >--- > C4/Letters.pm | 4 ++-- > t/db_dependent/Letters/TemplateToolkit.t | 14 +++++++++++++- > 2 files changed, 15 insertions(+), 3 deletions(-) > >diff --git a/C4/Letters.pm b/C4/Letters.pm >index 99e17af..c00f328 100644 >--- a/C4/Letters.pm >+++ b/C4/Letters.pm >@@ -768,8 +768,8 @@ sub GetPreparedLetter { > > $letter->{content} = _process_tt( > { >- content => $letter->{content}, >- tables => $tables, >+ content => $letter->{content}, >+ tables => $tables, > substitute => $substitute, > } > ); >diff --git a/t/db_dependent/Letters/TemplateToolkit.t b/t/db_dependent/Letters/TemplateToolkit.t >index bdcfb96..755e98b 100644 >--- a/t/db_dependent/Letters/TemplateToolkit.t >+++ b/t/db_dependent/Letters/TemplateToolkit.t >@@ -18,7 +18,7 @@ > # along with Koha; if not, see <http://www.gnu.org/licenses>. > > use Modern::Perl; >-use Test::More tests => 15; >+use Test::More tests => 16; > use Test::Warn; > > use MARC::Record; >@@ -279,3 +279,15 @@ $prepared_letter = GetPreparedLetter( > ) > ); > is( $prepared_letter->{content}, $modification->id(), 'Patron modification object used correctly' ); >+ >+$sth->execute( "TEST_SUBSTITUTION", "[% SubstituteMe %]" ); >+$prepared_letter = GetPreparedLetter( >+ ( >+ module => 'test', >+ letter_code => 'TEST_SUBSTITUTION', >+ substitute => { >+ SubstituteMe => 'Substituted' >+ } >+ ) >+); >+is( $prepared_letter->{content}, 'Substituted', 'Substitution works correctly' ); >-- >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 15969
:
48618
|
48811
|
55819
|
55820
|
57931
|
57933
|
57934
|
57935
|
59923
|
59924
|
59925
|
59926
|
59937
|
59940
|
59941
|
59942
|
59943
|
59944
|
59945
|
59962
|
59963
|
59964
|
59965
|
71141
|
71142
|
71143
|
71144
|
103181
|
103182
|
103183
|
103184
|
114413
|
114414
|
114415
|
114416
|
118207
|
118208
|
118209
|
118210