6 use Test::More tests => 3;
16 package Document::Page;
19 has 'body' => (is => 'rw', isa => 'Str', default => sub {''});
29 my ($self, $appendage) = @_;
30 $self->body($self->body . $appendage);
33 sub open_page { (shift)->append_body('<page>') }
34 sub close_page { (shift)->append_body('</page>') }
36 package Document::PageWithHeadersAndFooters;
39 extends 'Document::Page';
41 augment 'create' => sub {
48 sub create_header { (shift)->append_body('<header/>') }
49 sub create_footer { (shift)->append_body('<footer/>') }
54 extends 'Document::PageWithHeadersAndFooters';
56 augment 'create' => sub {
58 $self->create_tps_report;
61 sub create_tps_report {
62 (shift)->append_body('<report type="tps"/>')
66 my $tps_report = TPSReport->new;
67 isa_ok($tps_report, 'TPSReport');
71 q{<page><header/><report type="tps"/><footer/></page>},
72 '... got the right TPS report');