From 2f50333f4b3f3b809e3e0684d180af86b77ca188 Mon Sep 17 00:00:00 2001 From: Chris Cormack Date: Sat, 7 Jul 2012 11:35:47 +1200 Subject: [PATCH] Bug 5327 : Follow up for TTParser test --- C4/TTParser.pm | 1 + xt/tt_valid.t | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/C4/TTParser.pm b/C4/TTParser.pm index 87ad744..5058069 100644 --- a/C4/TTParser.pm +++ b/C4/TTParser.pm @@ -40,6 +40,7 @@ sub next_token{ #unshift token back on @tokens sub unshift_token{ + my $self = shift; unshift @tokens, shift; } diff --git a/xt/tt_valid.t b/xt/tt_valid.t index 97725ee..f71085e 100755 --- a/xt/tt_valid.t +++ b/xt/tt_valid.t @@ -57,7 +57,8 @@ ok( !@files_with_directive_in_tag, "TT syntax: not using TT directive within HTM ); my $testtoken = 0; -C4::TTParser::unshift_token($testtoken); +my $ttparser = C4::TTParser->new(); +$ttparser->unshift_token($testtoken); my $testtokenagain = C4::TTParser::next_token(); is( $testtoken, $testtokenagain, "Token received same as original put on stack"); -- 1.7.9.5