Test::Mockify::Method - chained setup
Test::Mockify::Method is used to provide the chained mock setup
when have to be called with a Test::Mockify::Matcher to specify the expected parameter list (signature). This will create for every signature a Test::Mockify::Parameter Object which will stored and also returned. So it is possible to create multiple signatures for one Method. It is not possible to mix when with whenAny.
when
whenAny
when(String()) when(Number(),String('abc'))
whenAny have to be called without parameter, when called it will accept any type and amount of parameter. It will return a Test::Mockify::Parameter Object. It is not possible to mix whenAny with when.
whenAny()
call will be called with a list of parameters. If the signature of this parameters match a stored signature it will call the corresponding parameter object.
call
call()
Copyright (C) 2017 ePages GmbH
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
Christian Breitkreutz <christianbreitkreutz@gmx.de>
To install Test::Mockify, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Test::Mockify
CPAN shell
perl -MCPAN -e shell install Test::Mockify
For more information on module installation, please visit the detailed CPAN module installation guide.