050: PHPUnit Data Providers (PHP)

Опубликовано: 20 Март 2026
на канале: The Engineering Coach
436
10

This video take a different approach to refactoring tests. In Episode 046 (   • 046:  Refactoring Unit Tests during Test D...  ) we delete tests that duplicate the coverage of the same behaviour. Sometimes you need to keep those test but still want to keep your test files tidy.

For this episode we look at how we can use PHPUnit Data Providers in PHP to tidy up the tests. Instead of deleting the test that cover the same behaviour we group them in to a test that uses Data Providers.

The code produced during this episode can be found on GitHub:
https://github.com/testingallthething...

You can follow me on twitter:   / braddle  

** Please Rate, Review, Subscribe and Share these videos **