I am trying to make fun of an object that receives two calls of the same function, but with different arguments. It's pretty straightforward to return different return values ββfor multiple calls, but I can't find anywhere else to do this with argument checking.
I tried:
$this->eventDispatcher ->shouldReceive('dispatch') ->twice() ->with(Events::SELECT,\Mockery::type('\Not\Really\A\Namespace\Event')) ->with(Events::ACTIVITY,\Mockery::type('\Not\Really\A\Namespace\Event');
and
$this->eventDispatcher ->shouldReceive('dispatch') ->twice() ->with( [Events::SELECT,\Mockery::type('\Not\Really\A\Namespace\Event')], [Events::ACTIVITY,\Mockery::type('\Not\Really\A\Namespace\Event')] );
But they do not work .
From the output of PHPUnit it seems to me that I'm getting an array?
php symfony mocking phpunit mockery
shokora
source share