Test::Magpie::Mock - A mock object
Mock objects are the objects you pass around as if they were real objects. They do not have a defined API; any method call is valid. A mock on its own is in record mode - method calls and arguments will be saved. You can switch temporarily to stub and verification mode with when and verify in Test::Magpie, respectively.
when
verify
This attribute is internal, and not publically accessible.
Returns a map of method name to stub array references. Stubs are matched against invocation arguments to determine which stub to dispatch to.
Returns an array reference of all method invocations on this mock.
Forced to return true for any package
Forced to return true for any role
Oliver Charles
This software is copyright (c) 2010 by Oliver Charles <oliver.g.charles@googlemail.com>.
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.
To install Test::Magpie, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Test::Magpie
CPAN shell
perl -MCPAN -e shell install Test::Magpie
For more information on module installation, please visit the detailed CPAN module installation guide.