Back to the Learning

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.

Stubs

Episode 3 Run Time 7:04

A mock allows us to enforce that certain messages are sent to various collaborators. A stub is a bit different. Think of a stub as a stand-in that returns any kind of hard-coded data. "When this method is called, return false." Let's dig into this idea a bit more.

Publish Date: December 16, 2014