Mocks for deep arguments in the function doesn't work
wppunk opened this issue · 5 comments
wppunk commented
expect( 'func_1' )
->once()
->with(
[
'arg1' => Mockery::type( 'string' ),
]
)
->andReturn( true );
$this->assertTrue( func_1( [ 'arg1' => 'krya' ] ) );
Mockery::type( ... )
works only for first level of arguments.
gmazzap commented
Sorry, you mean is not supported by Mockery?
In that case you should open a ticket for them. Or use validation via closure: http://docs.mockery.io/en/latest/reference/argument_validation.html#complex-argument-validation
gmazzap commented
Thanks. So I'm closing this. In case they introduce that funcitonality, it will land on Brain Monkey automatically, since this just wrap that.