frzb / phpunit-pretty-io
Pretty IO For PHPUnit
v1.0.0
2022-08-02 19:34 UTC
Requires
- php: ^8.1
- phpunit/phpunit: ^9|^10
- spatie/regex: ^3.1
Requires (Dev)
- friendsofphp/php-cs-fixer: ^3.9
- symfony/var-dumper: ^6.1
This package is auto-updated.
Last update: 2024-10-29 15:00:35 UTC
README
✅ Make your PHPUnit output beautiful
Installation
composer require frzb/phpunit-pretty-io --dev
This package supports PHPUnit 9
and 10
.
Usage
You can specify the printer to use on the phpunit command line:
Use the following:
php vendor/bin/phpunit --printer 'FRZB\PHPUnit\IO\PrettyInputOutput' tests/
Optionally, you can add it to your project's phpunit.xml
file instead:
<phpunit bootstrap="bootstrap.php" colors="true" printerClass="FRZB\PHPUnit\IO\PrettyInputOutput" />
Optional
To view progress while tests are running you can set FRZB_PHPUNIT_PRETTY_IO_PROGRESS=true
as environment variable on your server or within your phpunit.xml
config file.
<phpunit> <php> <env name="FRZB_PHPUNIT_PRETTY_IO_PROGRESS" value="true" /> </php> </phpunit>