Allow mocking same functions with different arguments
gmazzap opened this issue · 1 comments
gmazzap commented
At the moment is not possible to mock same function with different arguments.
For example following code does not work as expected:
Functions::expect('function_name')
->with(true)
->once()
->andReturn('First');
Functions::expect('function_name')
->with(false)
->once()
->andReturn('Second');
If function_name()
is called in the SUT two times, once with true
and once with false
test fails because of errors on Mockery argument expectations.