psmail
281
3
General

Repos and testing - just how linked are they

Posted 4 years ago by psmail

Hi - a little bit off topic, but not hugely I hope.

I mentioned to JW via Twitter via conversation he was having with Phil S that I felt that repos and testing were very much linked in Laravel. Inferring, perhaps, in a way that other frameworks - certainly non-PHP frameworks - are not.

I understand you can choose not to use repos. And if you don't care about coupling to a model or eloquent or you're never going to swap out your database you might choose not to use a repo. But then, as I understand it, you're more likely than not to hit barriers to testing at some point if you don't use a repo. So with a Lavarel hat, one might choose to use repos for testability and not at all for decoupling. Indeed, as best I can tell this is what happens.

After a year of Laravel and Laracasts, is it still possible I am missing the point?

I look forward to your feedback.

Please sign in or create an account to participate in this conversation.