A PHPUnit result printer that shows per-file test progress and execution times.
composer.phar require --dev diablomedia/phpunit-pretty-printer
It's suggested to use the phpunit installed by composer.
You can specify the printer to use on the phpunit command line:
php vendor/bin/phpunit --printer 'DiabloMedia\PHPUnit\Printer\PrettyPrinter' tests/
To see per-test execution times, use the --debug
flag:
php vendor/bin/phpunit --printer 'DiabloMedia\PHPUnit\Printer\PrettyPrinter' --debug tests/
Optionally, you can add it to your project's phpunit.xml
file instead:
<phpunit bootstrap="bootstrap.php" colors="true" printerClass="DiabloMedia\PHPUnit\Printer\PrettyPrinter">
Default output:
Debug output showing time to run:
Inspiration for the default output was taken from https://github.com/adm-husker/kujira-phpunit-printer.