A Pro subscription is required to watch this lesson.

In this Larabit, I'll give you some basic tips and advice for extracting "interaction" traits for your tests. This is a very simple pattern, but one that provides a lot of bang for your buck. In fact, you'll find it in the Laravel codebase all over the place.

Let's have a look at how to extract a test-specific trait that interacts with the Stripe API.

Extract TraitsGenerate Stripe Tokens

Would you like to hear from Laracasts by email occasionally?