Back to the Learning!

Laracasts is packed full with over 1,000 lessons just like this one.

Sign up to get full access or log in to your account and sit back.

Published On Dec. 28th 2015

Testing Laravel: Testing Collaborators

Episode 6 Run Time 18:14

Download

If we have two Eloquent models... and we need them to interact with one another... and these interactions create and modify database records...well, how do we go about testing that? Let's answer this question, while, in the process, continuing our review of TDD, PHPUnit, guards, and more.

If you'd like to try your hand at the homework assigned at the end of the video, here's a link to the source code.