4 use Test::More 'no_plan';
10 # =begin testing SETUP
13 package Document::Page;
16 has 'body' => ( is => 'rw', isa => 'Str', default => sub {''} );
26 my ( $self, $appendage ) = @_;
27 $self->body( $self->body . $appendage );
30 sub open_page { (shift)->append_body('<page>') }
31 sub close_page { (shift)->append_body('</page>') }
33 package Document::PageWithHeadersAndFooters;
36 extends 'Document::Page';
38 augment 'create' => sub {
45 sub create_header { (shift)->append_body('<header/>') }
46 sub create_footer { (shift)->append_body('<footer/>') }
51 extends 'Document::PageWithHeadersAndFooters';
53 augment 'create' => sub {
55 $self->create_tps_report;
59 sub create_tps_report {
60 (shift)->append_body('<report type="tps"/>');
63 # <page><header/><report type="tps"/><footer/></page>
64 my $report_xml = TPSReport->new->create;
71 my $tps_report = TPSReport->new;
72 isa_ok( $tps_report, 'TPSReport' );
76 q{<page><header/><report type="tps"/><footer/></page>},
77 '... got the right TPS report'