Koha/t/TmplToken.t
Chris Cormack a9bbeae6cc Bug 5327 : Adding more unit tests
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
New tests run without problems.
2011-12-07 16:17:07 +01:00

22 lines
570 B
Perl
Executable file

#!/usr/bin/perl
#
# This Koha test module is a stub!
# Add more tests here!!!
use strict;
use warnings;
use C4::TmplTokenType;
use Test::More tests => 7;
BEGIN {
use_ok('C4::TmplToken');
}
ok (my $token = C4::TmplToken->new('test',C4::TmplTokenType::TEXT,10,'/tmp/translate.txt'), "Create new");
ok ($token->string eq 'test', "String works");
ok ($token->type == C4::TmplTokenType::TEXT, "Token works");
ok ($token->line_number == 10, "Line number works");
ok ($token->pathname eq '/tmp/translate.txt', "Path works");
ok ($token->text_p, "text_p works");