// Verify invoked at least once
$obj->verifyInvoked('methodName');
 
 
// Invoked exactly with $param1 and $param2 values
$obj->verifyInvoked('methodName',[$param1,$param2]);
 
 
// Inovked that method was called exactly $times times.
 $obj->verifyInvokedMultipleTimes('methodName', $times, $params = array());
 
 
// Method never invoked
$obj->verifyNeverInvoked('methodName', $params = array());
 
 
// Get list of call method with all of params for each call
$user = aspectMock::double('UserModel');
$user->someMethod('arg1', 'arg2');
$user->someMethod('arg3', 'arg42');
$user->getCallsForMethod('someMethod') // Will return [ ['arg1', 'arg2'], ['arg3', 'arg4']]

Leave a reply:

Your email address will not be published.

Site Footer

Sliding Sidebar

About Me

About Me

Hello, my name is Dũng (Johnny). Welcome to my blog.

As I’m a developer, I write about topics related to the field of programming, mainly from a technical point of view. On this blog you’ll find posts which encourage discussion, information about development trends, case studies, reviews, tutorials, tips on how to improve your effectiveness, and anything else that might be fascinating to people from the IT industry.

  • http://lcdung.top/about/
  • Mail: ledung@8bitbase.com

Time line