Try Test::MockObject::Extends:
use Test::MockObject; use Test::MockObject::Extends; use Test::More 'no_plan'; use strict; Test::MockObject->fake_module( 'Foo' ); my $x = Test::MockObject::Extends->new( 'Foo' ); $x->mock( 'bar', sub { 2 } ); is( $x->isa('Foo'), 1 ); is( $x->bar('Foo'), 2 );
In reply to Re: Mocking isa
by chromatic
in thread Mocking isa
by water
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |