Skip to main content

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.be

spatie.be thumbnail
We design, build and support websites, webshops and applications —since 2004. We prefer analysis, clear-cut advice and solid technology over momentary fads. Our sites are built with modern standards, and optimized for performance on all types of devices. Almost every aspect of our job builds upon the work of others. We greatly value open source and try to give back to the community whenever possible. There is a strong mentality to stay on top of things: through Slack, in-house presentations or conferences. A part of our workload is dedicated to open source and side projects. You can spot team members in user groups or as conference speakers as well.

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