Download the PHP package robiningelbrecht/phpunit-pretty-print without Composer
On this page you can find all versions of the php package robiningelbrecht/phpunit-pretty-print. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download robiningelbrecht/phpunit-pretty-print
More information about robiningelbrecht/phpunit-pretty-print
Files in robiningelbrecht/phpunit-pretty-print
Package phpunit-pretty-print
Short Description Prettify PHPUnit output
License MIT
Informations about the package phpunit-pretty-print
Better PHPUnit CLI output
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.
Installation
Configuration
Navigate to your phpunit.xml.dist
file and add following config to set default options
(you can also set these options at run time):
Also make sure the color
attribute is set to true
:
Options
All these options can be set at runtime as well, see usage.
Output profiling report
Enable compact mode
Feel good about yourself after running your testsuite by displaying a Chuck Noris quote
Disable pretty print.
This can be useful when you only want to prettify the output when forced via CLI (see usage).
Usage
Output profiling report
Enable compact mode
Display Chuck Norris quote
Enable/disable pretty print
Combine multiple options
PHPUnit 9.x
This package does not support PHPUnit 9.x but Collision does out of the box. Run
Then add the Collision printerClass
to your phpunit.xml
in the phpunit
section:
Acknowledgements
- API used for Chuck Noris quotes: https://api.chucknorris.io/
- CLI formatting: https://github.com/nunomaduro/collision
All versions of phpunit-pretty-print with dependencies
nunomaduro/collision Version ^7.8|^8.0
phpunit/phpunit Version ^10.3|^11.0