#!/usr/bin/perl -w
use
XML::Atom::Filter;
diag(
'Subclass invoked with class methods'
);
{
sub
pre {
my
(
$class
,
$feed
) =
@_
;
Test::More::isa_ok(
$feed
, XML::Atom::Feed,
'Preprocessing an XML::Atom::Feed'
);
}
sub
entry {
my
(
$class
,
$entry
) =
@_
;
Test::More::isa_ok(
$entry
, XML::Atom::Entry,
'Processing an XML::Atom::Entry'
);
Test::More::is(
$entry
->id,
'http://www.example.com/2005/04/07/example'
,
'Processed entry has correct id'
);
}
sub
post {
my
(
$class
,
$feed
) =
@_
;
Test::More::isa_ok(
$feed
, XML::Atom::Feed,
'Postprocessing an XML::Atom::Feed'
);
}
open
my
$fh
,
'<'
,
't/example.xml'
;
TestFilter->filter(
$fh
);
close
$fh
;
};