dev-develop
dev-developPrettify PHPUnit output
MIT
The Requires
- php >=7.0.0
- phpunit/phpunit >=7.0.0
Prettify PHPUnit output
✅ Make your PHPUnit output beautiful, (*1)
composer require sempro/phpunit-pretty-print --dev
This package requires >=7.0.0
of PHPUnit., (*3)
If you're running on 6.x
, please use version 1.0.3
., (*4)
If you are running on 9.x
use the \Sempro\PHPUnitPrettyPrinter\PrettyPrinterForPhpUnit9
class, (*5)
You can specify the printer to use on the phpunit command line:, (*6)
For PhpUnit < 9, use the following:, (*7)
php vendor/bin/phpunit --printer 'Sempro\PHPUnitPrettyPrinter\PrettyPrinter' tests/
For PhpUnit >= 9, use the following:, (*8)
php vendor/bin/phpunit --printer 'Sempro\PHPUnitPrettyPrinter\PrettyPrinterForPhpUnit9' tests/
Optionally, you can add it to your project's phpunit.xml
file instead:, (*9)
<phpunit bootstrap="bootstrap.php" colors="true" printerClass="Sempro\PHPUnitPrettyPrinter\PrettyPrinterForPhpUnit9">
, (*10)
To view progress while tests are running you can set PHPUNIT_PRETTY_PRINT_PROGRESS=true
as environment variable on your server or within your phpunit.xml
config file., (*11)
<phpunit> <php> <env name="PHPUNIT_PRETTY_PRINT_PROGRESS" value="true" /> </php> </phpunit>
MIT © Sempro AS, (*12)
Prettify PHPUnit output
MIT