The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.
package XML::XSS::DocumentTest;

use strict;
use warnings;

no warnings qw/ uninitialized /;

use base qw/ My::Test::Class /;

use Test::More;

use XML::XSS;

sub pod_synopsis :Tests {
    
    my $xss = XML::XSS->new;

    my $doc_style = $xss->document;

    $doc_style->set_pre( "=pod\n" );
    $doc_style->set_post( "=cut\n" );

    is $xss->render( '<doc>yadah yadah</doc>' ) =>
        "=pod\n<doc>yadah yadah</doc>=cut\n";

}


sub render_ok {
    my ( $self, $expected, $comment ) = @_;

    is $self->{xss}->render( $self->{doc} ), $expected, $comment;
}

sub create_xss : Test(setup) {
    my $self = shift;
    $self->{xss} = XML::XSS->new;
    $self->{doc} = '<doc><foo>bar</foo></doc>';
    $self->{foo} = $self->{xss}->element('foo');
}

1;