PHP Testing Jargon
There's no two ways about it: terminology in the testing world is incredibly overwhelming. Mocks, stubs, and dummies oh my!
Let's see if we can cut through the noise. Come along as, bit by bit, we break all of these confusing concepts down into something you can easily understand and implement within your own projects.
Series episodes
Unit Testing (7)
Intro to PHP Testing Jargon
1m 31sAnimated intro to PHP testing jargon: quick overview of terms and concepts you'll use throughout the testing series.
Unit Test a Simple Class
18m 8sLearn unit testing basics with TDD: build a simple TagParser that splits comma or pipe-separated tags into an array for reliable code.
Setup the World
2m 31sOrganize unit tests with setUp: learn practical patterns to initialize state before each test and keep your test suite clean and consistent.
When to Reach for Data Providers
5m 55sLearn to simplify repetitive PHPUnit tests using data providers—cleaner TagParser examples, fewer assertions, and faster test maintenance.
A Unit Test is Not Locked to a Single Class
25m 4sLearn when and how unit tests can involve multiple classes (and even the database), improving real-world test effectiveness and confidence.
Homework Solutions
6m 56sFollow step-by-step solutions to the two homework tests: learn how to write, run, and fix them so your code passes with confidence.
Green is When You Refactor
17m 13sLearn how to confidently refactor your Quiz app code with tests that catch mistakes instantly, making improvements safe and efficient with a Questions collection class.
Test Doubles (4)
A Dummy is a Stand-in for the Real Thing
11m 59sLearn how test doubles like dummies act as stand-ins to simplify and strengthen your tests. Boost your testing skills with clear, practical examples!
Let PHPUnit Create Your Test Doubles
3m 11sDiscover how to let PHPUnit create test doubles automatically using createMock(). Simplify your testing process with this friendly, practical guide.
Stubs Versus Mocks
11m 5sLearn the key differences between stubs and mocks with a practical example. Enhance your testing skills in this friendly, clear, and engaging guide.
The Downside to Mocking
5m 16sExplore the potential downsides of mocking in testing. Learn about Classical vs. Mockist approaches to write better, more effective tests in this friendly guide.
Feature Testing (2)
Feature Testing Defined
5m 17sUnderstand feature (end-to-end) testing—what it is, how it differs from other test types, and when to use each approach.
When to Reach for Browser Testing
9m 24sLearn when to use browser testing with Laravel Dusk—open browsers, interact with JS, and test real UI flows beyond backend feature tests.




