logo

Start writing Laravel tests that actually matter

A structured approach to writing useful tests, taught in a real-world sample app. Then you take each technique straight into your own Laravel apps.

Get the course

Are you a Laravel developer ready to level up your testing skills?

Whether you're just getting started or struggling to write meaningful tests, this course is designed for you.

You're not alone if you've felt this way:

  • I've tried learning testing before, but applying it to my real project is... different

  • I know testing is important, but where do I even begin?

  • Does testing even matter with AI writing most of my code?

  • Am I even testing the right things?

Now imagine this instead:

  • Opening your editor each morning, confident that your test suite has your back

  • Letting your agent make code changes without that nagging worry of breaking something

  • Having a clear process for what to test in every new feature

  • Understanding why your tests are written that way

A Different Approach to Learning Testing

This isn't another course where you'll build a todo app. You'll learn testing principles in a real-world sample app, with the complexity and challenges of a real project. Then you'll put each technique to work in your own Laravel apps.

  • Watch a Lesson

    Watch a short, focused lesson on one key testing principle, whenever it fits your schedule.

  • Homework

    Then your homework is to apply that principle directly in your project.

  • Support

    With the community option, get help in a private Slack channel if you hit a roadblock.

What Makes This Course Different

  • Real-World Examples

    No toy examples. You'll learn in a realistic sample app, then apply everything in your own codebase.

  • Focused Content

    Only what matters, no fluff. Each lesson tackles one specific principle.

  • Direct Support

    Stuck? With the community option, get help in a private Slack channel just for testing course questions.

  • Opinionated Approach

    Clear guidelines based on years of real-world testing experience.

Your satisfaction matters

If the course doesn't meet your expectations, you can request a full refund within 30 days. No questions asked.

100% RISK FREE

What You'll Learn

  • How to write tests that actually give you confidence
  • What's worth testing, and what's not
  • How to test legacy code without rewriting everything
  • How to test complex features without breaking your flow
  • When to mock, when to assert, and when to leave it alone

If you're not already on board with why testing is so valuable, check out these podcast episodes:

Course cheat sheet
  • Checkout flowFeature test
  • Tax calculatorUnit test
  • Stripe API callFake it
  • Welcome emailAssert sent
  • Eloquent accessorSkip it

The full course curriculum

39 lessons available now, 13 more coming

Part 1: Getting Started

  • Welcome 6:00
  • Course Logistics 5:58
  • Environment Setup 11:36

Part 2: Feature Test Fundamentals

  • Picking our first test 11:18
  • Testing as a logged-in user 9:49
  • Testing view data 4:06
  • Smart use of TODOs in tests 4:42
  • Running tests in the editor 9:26
  • Writing a simple factory 12:22
  • Updating existing factories 11:26
  • Detailed data query testing 21:05
  • Testing view logic 11:49
  • Testing authorization logic 5:54

Part 3: Authentication, Search & Events

  • Testing authentication logic 14:55
  • Our first test helper 10:02
  • Testing pagination 12:26
  • Testing search logic 21:25
  • Testing events 9:44
  • Testing event properties 5:49
  • Testing listeners 17:22

Part 4: Policies & Gates

  • Testing a show action 12:05
  • Testing a simple policy 7:51
  • Testing a policy with a before check 5:54
  • Testing a gate 5:20

Part 5: Testing Forms

  • What about seeders? 7:56
  • Testing a create action 5:34
  • Setting up form data 15:39
  • Mocking a service 8:31
  • Strengthening our mock assertions 9:04
  • Setting up mock return values 3:33
  • Basic database assertions 11:57
  • Testing file storage 4:39
  • Testing session data 4:00
  • Testing required fields 16:09
  • Testing field data types 6:59
  • Testing field length 6:17

Part 6: Edit, Delete, Dates & Notifications

  • Testing an edit action 7:40
  • Testing an update action 27:21
  • Testing a destroy action 9:21
  • Testing date logic Coming soon
  • Testing custom validation logic Coming soon
  • Testing mailables Coming soon
  • Testing notifications Coming soon

Part 7: Beyond Controllers

  • Using test coverage as a guide Coming soon
  • Testing commands Coming soon
  • Testing jobs Coming soon
  • Testing notification logic Coming soon
  • Testing mailable logic Coming soon
  • Testing a service class Coming soon
  • Testing API controllers and resources Coming soon
  • Testing Livewire components Coming soon
  • Wrap up Coming soon

A peek inside the course

See exactly how the course teaches, with a full lesson you can watch right now.

Free lesson 11:18

4. Picking our first test

Pick an easy first target from the routes file, generate a test class with make:test, and write a passing guest test using route names, assertOk(), and assertViewIs().

quote

Your class really helped me get my head around testing. I was starting to update my apps with Claude as my coding partner, and I was able to efficiently build a test suite that provided more coverage than I would have been willing to do on my own. Insisting on strong coverage made the code easier to defend and quicker and safer to fix.

Rick Retzko
Rick Retzko
Founder of MFR Holdings

Choose the option that fits you

Learn on your own with the course, or add lifetime access to the community for help along the way.

Presale pricing ends Friday, November 20 at midnight Central

Days
Hours
Minutes
Seconds

Testing Course

The complete video course

$149
$249
One-time payment
  • All 52 lessons, with 39 available today
  • New lessons included as they're released
  • Lifetime access to the course
Best value

Testing Course + Community

The course plus lifetime community access

$299
$399
One-time payment
  • Everything in the course
  • Lifetime access to the Mastering Laravel Slack community
  • A bonus channel just for testing course questions

30-day refund guarantee. If the course doesn't help you write better tests, let me know within 30 days for a full refund. Questions first? Get in touch.

Already bought the course? Log in to start watching.

Questions & Answers

Do I need to be a testing expert?


Not at all. If you can write Laravel code, you're ready for this course.

Does testing still matter if AI writes most of my code?


I sure think so! AI writes code faster than ever, but tests you can really trust allow you to keep moving quickly with confidence.

What if I use Pest instead of PHPUnit?


The principles we'll cover work with both. We'll use PHPUnit in examples because it helps you understand the fundamentals, but everything translates to Pest.

What kind of projects is this for?


If you're building with Laravel, this is for you. We'll cover testing strategies for traditional apps, APIs, and even console commands.

What if I don't have a project of my own to use?


No problem. The whole course is taught in a sample app with almost no tests, and you get access to it so you can follow along and practice there.

When will the rest of the lessons be released?


The remaining 13 lessons are coming mid-November. You get every new lesson as soon as it's released, at no extra cost.

How much time do I need?


The course is self-paced, so go as fast or slow as you like. A good rhythm is an hour or two a week for the lessons, plus another 2 to 3 hours to apply them in your own project. (This is where the magic happens!)

What if the course isn't for me?


Let me know within 30 days for a full refund, no questions asked. If you bought the community option, the refund also ends your Slack access.

What if my project is under NDA? How will I get help?


Help in Slack comes with the community option. You are under no obligation to share source code when asking for help. If necessary, you can share small sanitized snippets. If it's a very complex issue that requires source code for context, you will need to decide what can be shared or not. Buying for your team? Get in touch and I'll work out the details.

Joel Clermont

Hi, I'm Joel, your instructor.

If you still have questions or need help deciding if this course is right for you, feel free to reach out directly. I'd love to help.

Get in touch