Open jorgsowa opened 2 years ago
Workaround for this issue. Just add all missing parameters with the default value preceding the named arguments (any named arguments. Those must be in the correct order.
$this->repository
->get([self::ID], false, true, false, orderBy: 'sort, id')
I found out that it's not possible to mock methods which are using named parameters. Example:
The same parameters are used in the referenced method, but still, I can't mock this function and receive the error:
Return value must be of type Objects, null returned
.When I provide defaults values for all the preceding parameters it works fine.