]> iEval git - html-element-library.git/blob - t/table-alt.t
Refactor tests (first pass)
[html-element-library.git] / t / table-alt.t
1 #!/usr/bin/perl
2 use t::lib tests => 1;
3 use lib 't';
4 use SimpleClass;
5
6 my $o = SimpleClass->new;
7 my $tree = mktree 't/html/table-alt.html';
8
9 $tree->table(
10 gi_table => 'load_data',
11 gi_tr => ['iterate1', 'iterate2'],
12 table_data => $o->load_data,
13 tr_data => sub {
14 my ($self, $data) = @_;
15 shift @{$data};
16 },
17 td_data => sub {
18 my ($tr_node, $tr_data) = @_;
19 $tr_node->content_handler($_ => $tr_data->{$_}) for qw(name age weight)
20 });
21
22 isxml $tree, 't/html/table-alt.exp', 'table (alternating)';
This page took 0.045296 seconds and 4 git commands to generate.