Browse Source

Bug 5327 added unit tests for C4/TmplToken.pm

Signed-off-by: Chris Hall <chrish@catalyst.net.nz>
3.8.x
Bart Jorgensen 10 years ago
committed by Paul Poulain
parent
commit
37c9ffcf7d
  1. 26
      t/TmplToken.t

26
t/TmplToken.t

@ -6,7 +6,7 @@
use strict;
use warnings;
use C4::TmplTokenType;
use Test::More tests => 7;
use Test::More tests => 19;
BEGIN {
use_ok('C4::TmplToken');
@ -20,3 +20,27 @@ ok ($token->pathname eq '/tmp/translate.txt', "Path works");
ok ($token->text_p, "text_p works");
is($token-> children(), undef, "testing children returns undef when given argument");
ok($token-> set_children(), "testing set_children with no arguments");
is($token-> parameters_and_fields(), "0", "testing Parameters and fields returns 0 when given argument");
is($token-> anchors(), "0", "testing anchors returns 0 when given argument");
is($token-> form(),undef, "testing form returns undef when given argument");
ok($token-> set_form(), "testing set_form with no arguments");
is($token-> js_data(),undef, "testing form returns undef when given argument");
ok($token-> set_js_data(), "testing set_js_data with no arguments");
is($token-> tag_p(),"", "testing tag_p returns '' when given argument");
is($token-> cdata_p(),"", "testing cdata_p returns '' when given argument");
is($token-> text_parametrized_p(),"", "testing text_parametrized returns '' when given argument");
is($token-> directive_p(),"", "testing directive_p returns '' when given argument");
Loading…
Cancel
Save