The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

Name

Test::Mockify::Method - chained setup

DESCRIPTION

Test::Mockify::Method is used to provide the chained mock setup

METHODS

when

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(String())
  when(Number(),String('abc'))

whenAny

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

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()

LICENSE

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.

AUTHOR

Christian Breitkreutz <christianbreitkreutz@gmx.de>