Black Friday: the Laravel testing course is $149 instead of $249, through Dec 7. See the course →
logo

Examining test layering in multi-tenant requests

A fun little debate

Joel Clermont
Joel Clermont
2025-01-27

From our daily Laravel tips email. Get the next one in your inbox.

I like having a structured way to write my tests. It makes them quicker to write and prevents you from overlooking important test cases. But not everything can be boiled down to a neat and tidy rule.

In the latest episode of the No Compromises podcast, we talk about a recent project with a multi-tenant architecture and how it caused us to think differently about how we layered our tests and what the requests look like.

  • 00:00 Debating authentication vs. tenant header priority
  • 02:15 Handling unusual requirements in request tests
  • 05:00 Navigating multi-layer middleware concerns
  • 08:30 Balancing thoroughness and test coverage
  • 12:00 Silly bit

Listen Now (13 min)

And after listening, don't forget to subscribe to the podcast, so you don't miss future episodes.

Here to help,

Joel

P.S. Want to join the next Mastering Laravel dev call? Join the community and get notified when the next call is scheduled.

Want a tip like this in your inbox every weekday?

Each one takes less than 2 minutes to read. Join 4,000+ Laravel developers who already get them.

email
No spam. Only real-world advice.
Toss a coin in the jar if you found this helpful.