Better PHPUnit CLI output with Collision

A bridge between Collision and PHPUnit

Robin Ingelbrecht
2 min readApr 25, 2023

I really like how Pest PHP formats and outputs test results, but I still prefer to use PHPUnit. Luckily there’s Collision. This package is designed to give you beautiful error reporting when interacting with your app through the command line.

Collision logo

The new major release of PHPUnit gives developers the opportunity to extend it by using the event system.

PHPUnit’s default CLI output is simple and straight forward, but me being me, that’s not enough of course 🙈. That’s why I decided to create a bridge between PHPUnit and Collision.

The extension allows you to

  • Output a profiling report at the end of the test run
  • Use a compact mode to only output the testsuite results instead of all separate tests
  • Feel good about yourself after running your testsuite by displaying a Chuck Noris quote
Example CLI output

Consider giving the repository a ⭐️ if you decide to use the extension:

--

--

Robin Ingelbrecht

My name is Robin Ingelbrecht, and I'm an open source (web) developer at heart and always try to up my game. Obviously, I'm also into gaming 🎮.