]> iEval git - html-element-library.git/blame - t/table.t
Refactor tests (first pass)
[html-element-library.git] / t / table.t
CommitLineData
aa016126
MG
1#!/usr/bin/perl
2use t::lib tests => 1;
3use lib 't';
67e78ff2 4use SimpleClass;
5
67e78ff2 6my $o = SimpleClass->new;
aa016126
MG
7my $tree = mktree 't/html/table.html';
8
9$tree->table(
10 gi_table => 'load_data',
11 gi_tr => 'data_row',
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
22isxml $tree, 't/html/table.exp', 'table';
This page took 0.028101 seconds and 4 git commands to generate.