I need to test helper method that accepts Illuminate\Database\Eloquent\Collection as a parameter. But I can not figure out how to prepare it inside a unit test. My logic says it should be simple to create Collection from assoc array. But I just can’t get it to work.
At the moment, not to get stuck, I will probably use feature testing (because if feature (API endpoint) works then probably my helper method also works). Though, it feels stupid workaround.