summaryrefslogtreecommitdiff
path: root/cpan/dist/File-MMagic/t/05-subclass.t
blob: 8a076387ece9274992966f136a46d28d373cb36d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
use strict;
use warnings;
use Test::More tests => 3;

my $mm = Example::Module->new();
isa_ok( $mm, 'Example::Module', 'subclassed object' );
isa_ok( $mm, 'File::MMagic', 'subclassed object' );
is( $mm->checktype_filename(), 'foo/bar', 'override method' );

package Example::Module;
use base qw( File::MMagic );

sub checktype_filename { 'foo/bar' }