Extend the default PHPUnit Result Printer with a modern, pretty printer!
PHPUnit Pretty Result Printer -- Packagist
Installation is provided via composer and can be done with the following command, the current version requires PHP 7.1 or greater:
composer require --dev codedungeon/phpunit-result-printer
Laravel 5.3 with PHP version 7.0.x:
If you are using PHP 7.0.x, you will need to use a compatible version of PHPUnit Result Printer (version 0.8.x)
composer require --dev codedungeon/phpunit-result-printer:^0.8
To activate the Printer for PHPUnit, just add it to your configuration XML:
<?xml version="1.0" encoding="UTF-8"?>
<phpunit printerClass="Codedungeon\PHPUnitPrettyResultPrinter\Printer">
// ....
</phpunit>
Or from Command-Line:
phpunit --printer=Codedungeon\\PHPUnitPrettyResultPrinter\\Printer
You can customize the markers which are used for success
, fail
, error
, skipped
, incomplete
by modifying the phpunit-printer.yml
file.
- Create a
phpunit-printer.yml
file in your application root to override default
The following are the default markers used (from the package phpunit-printer.yml
file)
markers:
cd-pass: "✓"
cd-fail: "✖"
cd-error: "⚈"
cd-skipped: "→"
cd-incomplete: "∅ "
Copyright © 2017-2018 Mike Erickson Released under the MIT license
phpunit-result-printer written by Mike Erickson
E-Mail: [email protected]
Twitter: @codedungeon
Website: https://github.com/mikeerickson