PHPackages                             robiningelbrecht/phpunit-pretty-print - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Testing &amp; Quality](/categories/testing)
4. /
5. robiningelbrecht/phpunit-pretty-print

ActiveLibrary[Testing &amp; Quality](/categories/testing)

robiningelbrecht/phpunit-pretty-print
=====================================

Prettify PHPUnit output

v1.5.0(1mo ago)76460.0k—3.7%2[1 issues](https://github.com/robiningelbrecht/phpunit-pretty-print/issues)15MITPHPPHP ^8.1

Since Mar 31Pushed 1mo ago2 watchersCompare

[ Source](https://github.com/robiningelbrecht/phpunit-pretty-print)[ Packagist](https://packagist.org/packages/robiningelbrecht/phpunit-pretty-print)[ Fund](https://www.buymeacoffee.com/ingelbrecht)[ GitHub Sponsors](https://github.com/robiningelbrecht)[ RSS](/packages/robiningelbrecht-phpunit-pretty-print/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (10)Dependencies (10)Versions (16)Used By (15)

Better PHPUnit CLI output
=========================

[](#better-phpunit-cli-output)

 [![PHPUnit](readme/logo.png)](readme/logo.png)

[![CI](https://github.com/robiningelbrecht/phpunit-pretty-print/actions/workflows/ci.yml/badge.svg)](https://github.com/robiningelbrecht/phpunit-pretty-print/actions/workflows/ci.yml)[![License](https://camo.githubusercontent.com/bcb337659d7f10e7f47fe8757a9c8f27238603b540eddcf10c43b972914bdffe/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6c6963656e73652f726f62696e696e67656c6272656368742f706870756e69742d7072657474792d7072696e743f636f6c6f723d343238663765266c6f676f3d6f70656e253230736f75726365253230696e6974696174697665266c6f676f436f6c6f723d7768697465)](https://github.com/robiningelbrecht/phpunit-pretty-print/blob/master/LICENSE)[![](https://camo.githubusercontent.com/d1d0a46247926eb9a14c9ed94c82857116b973126964f2a72bf7252b0b071d8f/68747470733a2f2f636f6465636f762e696f2f67682f726f62696e696e67656c6272656368742f706870756e69742d7072657474792d7072696e742f6272616e63682f6d61737465722f67726170682f62616467652e7376673f746f6b656e3d6e737758514442456c35)](https://codecov.io/gh/robiningelbrecht/phpunit-pretty-print)[![PHPStan Enabled](https://camo.githubusercontent.com/cb01a196883cd3d15842161f335945a81aff81c4c55d44b9f3b9a648ebf0f774/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f5048505374616e2d6c6576656c253230392d7375636365732e7376673f6c6f676f3d706870266c6f676f436f6c6f723d776869746526636f6c6f723d333143363532)](https://phpstan.org/)[![PHP](https://camo.githubusercontent.com/cc46eadc6f778fc826eb67c6216855e930d052fbd0d179181a0f37492915c9a8/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f7068702d762f726f62696e696e67656c6272656368742f706870756e69742d7072657474792d7072696e743f636f6c6f723d253233373737626233266c6f676f3d706870266c6f676f436f6c6f723d7768697465)](https://php.net/)[![PHPUnit](https://camo.githubusercontent.com/f7a0c9ea26d9ca6cc6517c3db7511b52744db5c78ac95f0f86479417135d1293/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f646570656e64656e63792d762f726f62696e696e67656c6272656368742f706870756e69742d7072657474792d7072696e742f706870756e69742f706870756e69742e7376673f6c6f676f3d706870266c6f676f436f6c6f723d7768697465)](https://phpunit.de/)[![PHPUnit](https://camo.githubusercontent.com/a1898b0365ee509d122ee6ed8f1453c58ea85e06f658e4d792e37b3324700648/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f726f62696e696e67656c6272656368742f706870756e69742d7072657474792d7072696e743f6c6f676f3d7061636b6167697374266c6f676f436f6c6f723d7768697465)](https://github.com/robiningelbrecht/phpunit-pretty-print)

---

I really like how [Pest PHP](https://pestphp.com/) formats and outputs test results, but I still prefer to use [PHPUnit](https://phpunit.de/). Luckily there's [Collision](https://github.com/nunomaduro/collision). This package is designed to give you beautiful error reporting when interacting with your app through the command line.

Installation
------------

[](#installation)

```
composer require robiningelbrecht/phpunit-pretty-print --dev
```

Configuration
-------------

[](#configuration)

Navigate to your `phpunit.xml.dist` file and add following config to set default options (you can also set these options at run time):

```

```

Also make sure the `color` attribute is set to `true`:

```

```

Options
-------

[](#options)

All these options can be set at runtime as well, see [usage](#usage).

### Output profiling report

[](#output-profiling-report)

```

```

### Enable compact mode

[](#enable-compact-mode)

```

```

### Feel good about yourself after running your testsuite by displaying a Chuck Noris quote

[](#feel-good-about-yourself-after-running-your-testsuite-by-displaying-a-chuck-noris-quote)

```

```

### Disable pretty print.

[](#disable-pretty-print)

This can be useful when you only want to prettify the output when forced via CLI (see [usage](#usage)).

```

```

Usage
-----

[](#usage)

```
> vendor/bin/phpunit
```

 [![Example default](readme/example-default.png)](readme/example-default.png)

### Output profiling report

[](#output-profiling-report-1)

```
> vendor/bin/phpunit -d --profiling
```

 [![Example profiling](readme/example-profiling.png)](readme/example-profiling.png)

### Enable compact mode

[](#enable-compact-mode-1)

```
> vendor/bin/phpunit -d --compact
```

 [![Example compact](readme/example-compact.png)](readme/example-compact.png)

### Display Chuck Norris quote

[](#display-chuck-norris-quote)

```
> vendor/bin/phpunit -d --display-quote
```

 [![Example quote](readme/example-quote.png)](readme/example-quote.png)

### Enable/disable pretty print

[](#enabledisable-pretty-print)

```
> vendor/bin/phpunit -d --enable-pretty-print
> vendor/bin/phpunit -d --disable-pretty-print
```

### Combine multiple options

[](#combine-multiple-options)

```
> vendor/bin/phpunit --configuration=tests/phpunit.test.xml -d --compact -d --display-quote
```

PHPUnit 9.x
-----------

[](#phpunit-9x)

This package does not support PHPUnit 9.x but Collision does out of the box. Run

```
composer require nunomaduro/collision:^6.0
```

Then add the Collision `printerClass` to your `phpunit.xml` in the `phpunit` section:

```

```

Acknowledgements
----------------

[](#acknowledgements)

- API used for Chuck Noris quotes:
- CLI formatting:

###  Health Score

58

—

FairBetter than 98% of packages

Maintenance89

Actively maintained with recent releases

Popularity49

Moderate usage in the ecosystem

Community21

Small or concentrated contributor base

Maturity61

Established project with proven stability

 Bus Factor1

Top contributor holds 98.7% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~84 days

Recently: every ~191 days

Total

14

Last Release

53d ago

Major Versions

v0.0.2 → v1.0.02023-04-02

PHP version history (2 changes)v0.0.1PHP ^8.1 || ^8.2

v1.2.3PHP ^8.1

### Community

Maintainers

![](https://www.gravatar.com/avatar/8c460d3d078ca95a2f552ae1eb15d4fb916781d264149a1d5ca503fe69967b91?d=identicon)[robiningelbrecht](/maintainers/robiningelbrecht)

---

Top Contributors

[![robiningelbrecht](https://avatars.githubusercontent.com/u/203894?v=4)](https://github.com/robiningelbrecht "robiningelbrecht (77 commits)")[![GrahamCampbell](https://avatars.githubusercontent.com/u/2829600?v=4)](https://github.com/GrahamCampbell "GrahamCampbell (1 commits)")

---

Tags

php8pretty-printtestingphptestingphpunit

###  Code Quality

Static AnalysisPHPStan

Code StylePHP CS Fixer

Type Coverage Yes

### Embed Badge

![Health badge](/badges/robiningelbrecht-phpunit-pretty-print/health.svg)

```
[![Health](https://phpackages.com/badges/robiningelbrecht-phpunit-pretty-print/health.svg)](https://phpackages.com/packages/robiningelbrecht-phpunit-pretty-print)
```

###  Alternatives

[brianium/paratest

Parallel testing for PHP

2.5k118.8M754](/packages/brianium-paratest)[blastcloud/guzzler

Supercharge your app or SDK with a testing library specifically for Guzzle.

272419.3k35](/packages/blastcloud-guzzler)[juampi92/test-seo

Easy way to test your SEO

26341.0k](/packages/juampi92-test-seo)[robiningelbrecht/phpunit-coverage-tools

PHPUnit coverage tools

1783.0k34](/packages/robiningelbrecht-phpunit-coverage-tools)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
