Level 80
@alexanderwright Yeah, I’m a fan of data providers in PHPUnit tests. They’re good for testing a lot of different cases, i.e. a checking a formatter behaves as expected when given different values and values of different types.
Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.
Need to test a function with several sets of data?
Use a Dataset!
Enjoy easy to read more compact tests, with informative error messages!
Please or to participate in this conversation.