井関 恵太
and 2 contributors

NAME

Test::EasyMock::Class - support class method mocking.

SYNOPSIS

    use Test::EasyMock qw(:all);
    use Test::EasyMock::Class qw(create_class_mock);
    
    my $mock = create_class_mock('Foo::Bar');
    expect($mock->foo(1))->and_scalar_return('a');
    replay($mock);
    Foo::Bar->foo(1); # return 'a'
    Foo::Bar->foo(2); # Unexpected method call.(A test is failed)
    verify($mock); # verify all expectations is invoked.

FUNCTIONS

create_class_mock($class)

Creates a mock object for class.