frzb/phpunit-pretty-io

v1.0.0 2022-08-02 19:34 UTC

README

✅ Make your PHPUnit output beautiful

Build Status Packagist Packagist PRs Welcome psr-2

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" 
/>

Alt Text

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>