NAME

Test::Mock::Context - The mocking context which oversees the mocking process

VERSION

version 0.04

METHODS

mock(Str $class) : Object

Mock the class named $class. The mock object will be ISA $class, and will have all the methods that $class does (but obviously invoking them doesn't run them).

expect(Object $receiver, Str $method_name) : Test::Mock::Expectation

Register an expected method call of $method_name on $receiver. This will return a Test::Mock::Expectation, which you can specialize further with chaining if you need to specify further constraints.

satisfied : Bool

Check through the list of expectations and invocations, and make sure that they are consistent. That is, every invocation satisfies some sort of expectation in the correct order.

AUTHOR

Oliver Charles <oliver.g.charles@googlemail.com>

COPYRIGHT AND LICENSE

This software is copyright (c) 2010 by Oliver Charles.

This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.