diff --git a/t/mock.t b/t/mock.t index 5ec561b..21ce841 100755 --- a/t/mock.t +++ b/t/mock.t @@ -13,7 +13,7 @@ plan skip_all => "Test::MockObject required for mock testing" if $@; # OK, we've got Test::MockObject, so we can go ahead: -plan tests => 13; +plan tests => 15; # Easy test: get a mock statement handle, and check we can make a table: my $table = HTML::Table::FromDatabase->new( -sth => mocked_sth() ); @@ -40,6 +40,20 @@ $table = HTML::Table::FromDatabase->new( transform => sub { $_ = shift; s/R\dC\d/value_T/; $_ }, }, ], + -row_callbacks => [ + sub { + my $row = shift; + if ($row->{Col1} eq 'Hide') { + $row = undef; + } + }, + sub { + my $row = shift; + if ($row->{Col4} eq 'Munge') { + $row->{Col4} = 'Munged'; + } + }, + ], ); $html = $table->getTable; like($html, qr{