diablomedia / phpunit-pretty-printer
A PHPUnit result printer that shows per-file test progress and execution times
Installs: 357 204
Dependents: 8
Suggesters: 0
Security: 0
Stars: 77
Watchers: 5
Forks: 13
Open Issues: 5
Requires
- php: ^7.3 || ^8.0.0 || ^8.1.0
- phpunit/phpunit: ^9.0
Requires (Dev)
- friendsofphp/php-cs-fixer: 3.3.2
- nazar-pc/phpt-tests-runner: ^1.4.0
- phpstan/phpstan: 1.2.0
- dev-master
- 5.x-dev
- v5.0.0
- 4.x-dev
- v4.0.1
- v4.0.0
- 3.0.0
- 2.x-dev
- v2.0.0
- 1.x-dev
- v1.0.1
- v1.0.0
- dev-dependabot/composer/phpstan/phpstan-1.10.48
- dev-dependabot/composer/phpstan/phpstan-1.10.47
- dev-dependabot/github_actions/shivammathur/setup-php-2.28.0
- dev-dependabot/github_actions/actions/checkout-4
- dev-phpunit-9
This package is auto-updated.
Last update: 2023-12-08 20:01:48 UTC
README
A PHPUnit result printer that shows per-file test progress and execution times.
Installation
composer.phar require --dev diablomedia/phpunit-pretty-printer
Usage
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">
Screenshots
Default output:
Debug output showing time to run:
Acknowledgements
Inspiration for the default output was taken from https://github.com/adm-husker/kujira-phpunit-printer.