czim/phpunit-printer

Customized PHPUnit output

2.0.1 2023-04-12 07:59 UTC

This package is auto-updated.

Last update: 2024-11-12 11:50:04 UTC


README

Custom styled PHPUnit print output for testing our projects.

Compatibility

Install

composer require czim/phpunit-printer --dev

Usage

You can add the package extension to your project's phpunit.xml file:

<phpunit>
    <!-- ... -->

    <extensions>
        <bootstrap class="Czim\PHPUnitPrinter\PrintExtension"/>
    </extensions>
    
    <!-- ... -->
</phpunit>

Then you can run with only the new custom output by hiding the default progress:

vendor/bin/phpunit --no-progress

You can also run it with normal progress. The custom formatting will be displayed directly after the normal progress indicators when all tests are finished.