Bug 5327 : Follow up for TTParser test
authorChris Cormack <chrisc@catalyst.net.nz>
Fri, 6 Jul 2012 23:35:47 +0000 (11:35 +1200)
committerPaul Poulain <paul.poulain@biblibre.com>
Thu, 12 Jul 2012 14:06:21 +0000 (16:06 +0200)
C4/TTParser.pm
xt/tt_valid.t

index 87ad744..5058069 100644 (file)
@@ -40,6 +40,7 @@ sub next_token{
 
 #unshift token back on @tokens
 sub unshift_token{
+    my $self = shift;
     unshift @tokens, shift;
 }
 
index 97725ee..f71085e 100755 (executable)
@@ -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");