Skip to main content
CF

Testing Laravel with PHPUnit

2h 42m 59s
English
Paid

Embark on a journey to master testing in a Laravel application with Brent as your guide. Whether you're a complete beginner or already have some experience, this course will refine your skills and enhance your testing capabilities. Learn essential techniques, tips, and tricks for effective and efficient testing with Laravel.

Getting Started with Laravel Testing

Welcome to the world of application testing! This course offers a comprehensive introduction to testing in Laravel, allowing you to seamlessly integrate automated testing into your development workflow. In just a few lessons, you'll gain the ability to test the key components of your application, strengthening your codebase and boosting your confidence in your deployments.

Why Choose PHPUnit?

For this course, we focus on PHPUnit, the default test runner for Laravel applications. PHPUnit is widely adopted across the Laravel community, making it an essential tool for any developer looking to build reliable and maintainable applications. Through this course, you'll learn how to effectively utilize PHPUnit to write robust test suites for your Laravel projects.

Exploring Alternative Test Runners

Although PHPUnit is the standard, Pest is emerging as a promising alternative. This newer test runner offers a more concise and expressive syntax, which might appeal to developers seeking a different approach. If you're interested in exploring Pest further, consider checking out our dedicated Pest course for Laravel testing. Both approaches share fundamental testing concepts, though the syntax may vary.

Course Highlights

  • Understand the basics of testing in Laravel
  • Master PHPUnit as the primary test runner
  • Gain valuable insights into best practices for writing tests
  • Explore alternative testing frameworks like Pest

About the Author: Spatie

Spatie thumbnail

Spatie is a Belgian web-development agency and one of the most respected names in the Laravel ecosystem — the author of more than 350 open-source PHP / Laravel packages (Laravel Permission, Laravel Backup, Laravel Translatable, Laravel Image Optimizer, and many others) that anchor a substantial portion of working Laravel codebases. Spatie's paid course material extends the same depth into long-form video.

The CourseFlix listing carries two Spatie courses: Writing Readable PHP (the code-quality / readability discipline applied to modern PHP) and Testing Laravel with PHPUnit (the testing workflow for production Laravel applications).

Material is paid and aimed at PHP / Laravel developers ready to take code quality and testing as serious professional disciplines. For broader content, see CourseFlix's Laravel and PHP category pages.

Watch Online 36 lessons

This is a demo lesson (10:00 remaining)

You can watch up to 10 minutes for free. Subscribe to unlock all 36 lessons in this course and access 10,000+ hours of premium content across all courses.

View Pricing
0:00
/
#1: Intro
All Course Lessons (36)
#Lesson TitleDurationAccess
1
Intro Demo
03:33
2
Our First Test
04:40
3
Using a Database
07:53
4
Using Factories
06:50
5
Factory Relations
03:43
6
Testing a Form
07:24
7
Authenticated Testing
03:31
8
JSON Assertion
07:26
9
Testing Fakes
03:46
10
Mocking
05:03
11
Handcrafted Mocks
03:44
12
Testing Tim
02:50
13
Middleware Tests
05:15
14
Validation in Depth
05:43
15
Validation Rule Testing
02:52
16
Testing File Uploads
03:17
17
Policy Testing
03:03
18
Policies Continued
02:42
19
The HTTP Facade
04:03
20
Testing Console Apps
03:36
21
Testing Blade Components
04:10
22
Testing Livewire
03:21
23
Browser Tests
07:03
24
Dusk in Depth
04:02
25
Custom Factories
06:55
26
Testing Job
05:38
27
Testing Exceptions
02:18
28
TDD
06:35
29
Testing Domain Code
06:32
30
Refactoring with Tests
04:22
31
Regression Testing
01:53
32
Snapshot Testing
03:32
33
Tests and CI
03:09
34
Configuring Databases
01:50
35
Parallel Testing
03:47
36
Data Providers
06:58
Unlock unlimited learning

Get instant access to all 35 lessons in this course, plus thousands of other premium courses. One subscription, unlimited knowledge.

Learn more about subscription

Related courses

Frequently asked questions

What is Testing Laravel with PHPUnit about?
Embark on a journey to master testing in a Laravel application with Brent as your guide. Whether you're a complete beginner or already have some experience, this course will refine your skills and enhance your testing capabilities. Learn…
Who teaches this course?
It is taught by Spatie. You can find more courses by this instructor on the corresponding source page.
How long is the course?
It contains 36 lessons with a total runtime of 2 hours 42 minutes. Every lesson is available to watch online at your own pace.
Is it free to watch?
It is part of CourseFlix's premium catalog. A subscription unlocks the full video player; the course description, table of contents, and preview information are available to everyone.
Where can I watch it online?
The course is available to watch online on CourseFlix at https://courseflix.net/course/testing-laravel-with-phpunit. The page hosts every lesson with the integrated video player; no download is required.