This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Update File-Fetch to CPAN version 0.24
[perl5.git] / cpan / File-Fetch / t / null_subclass.t
1 use strict;
2 use warnings;
3
4 use Test::More tests => 5;
5
6 my $parent_class = 'File::Fetch';
7 my $child_class  = 'File::Fetch::Subclass';
8
9 use_ok( $parent_class );
10
11 my $ff_parent = $parent_class->new( uri => 'http://example.com/index.html' );
12 isa_ok( $ff_parent, $parent_class );
13
14 can_ok( $child_class, qw( new fetch ) );
15 my $ff_child = $child_class->new( uri => 'http://example.com/index.html' );
16 isa_ok( $ff_child, $child_class );
17 isa_ok( $ff_child, $parent_class );
18
19 BEGIN {
20         package File::Fetch::Subclass;
21         use vars qw(@ISA);
22         unshift @ISA, qw(File::Fetch);
23         }