PHPackages                             peterfox/phpunit-toon-result-printer - 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. peterfox/phpunit-toon-result-printer

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

peterfox/phpunit-toon-result-printer
====================================

A PHPUnit results printer that works with the TOON format

v1.2.0(2mo ago)31072MITPHPPHP ^8.4CI passing

Since Jan 20Pushed 2mo agoCompare

[ Source](https://github.com/peterfox/phpunit-toon-result-printer)[ Packagist](https://packagist.org/packages/peterfox/phpunit-toon-result-printer)[ Docs](https://github.com/peterfox/phpunit-toon-result-printer)[ GitHub Sponsors]()[ RSS](/packages/peterfox-phpunit-toon-result-printer/feed)WikiDiscussions main Synced today

READMEChangelog (3)Dependencies (14)Versions (7)Used By (0)

PHPUnit TOON Result Printer
===========================

[](#phpunit-toon-result-printer)

[![Latest Version on Packagist](https://camo.githubusercontent.com/c9be097ceeca68451ac6365557d0df92231968fea92645186bb14d0982e036d4/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f7065746572666f782f706870756e69742d746f6f6e2d726573756c742d7072696e7465722e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/peterfox/phpunit-toon-result-printer)[![Tests](https://camo.githubusercontent.com/84dbcbf3e119966381f614e65cd8ce602c41dda7092d72c2a376efb07acaef92/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f7065746572666f782f706870756e69742d746f6f6e2d726573756c742d7072696e7465722f72756e2d74657374732e796d6c3f6272616e63683d6d61696e266c6162656c3d7465737473267374796c653d666c61742d737175617265)](https://github.com/peterfox/phpunit-toon-result-printer/actions/workflows/run-tests.yml)[![Total Downloads](https://camo.githubusercontent.com/4c3577fe58ac7311280637c1d5274d2d5d0910b226c03fa2f9288e4c7196c03f/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f7065746572666f782f706870756e69742d746f6f6e2d726573756c742d7072696e7465722e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/peterfox/phpunit-toon-result-printer)

A PHPUnit results printer that outputs test results in [TOON](https://github.com/helgesverre/toon-php) (Token-Oriented Object Notation) format.

This extension is specifically designed to provide compact, highly readable test results optimized for LLM (Large Language Model) consumption, helping AI agents quickly diagnose test failures.

Features
--------

[](#features)

- **Compact Output**: Uses TOON format to minimize token usage while remaining human-readable.
- **AI-Friendly Diagnostics**: Includes file paths, line numbers, error messages, and stack traces for failed and errored tests.
- **Concise Success Reports**: Passed tests only show the test name and status to keep the output focused on what needs attention.
- **PHPUnit Extension**: Integrates seamlessly as a PHPUnit extension.

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

[](#installation)

You can install the package via composer:

```
composer require peterfox/phpunit-toon-result-printer --dev
```

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

[](#configuration)

### Permanent (Recommended)

[](#permanent-recommended)

To use this printer, add it as an extension in your `phpunit.xml` or `phpunit.xml.dist` file:

```

```

When enabled, it will suppress PHPUnit's default progress and result output, replacing it with TOON-formatted output at the end of the test execution.

### Manual (CLI)

[](#manual-cli)

If you don't want to enable it for all test runs, you can trigger it manually using the `--extension` flag:

```
vendor/bin/phpunit --extension "PeterFox\PhpUnitToonResultPrinter\ToonResultPrinterExtension"
```

Example Output
--------------

[](#example-output)

For a passing test:

```
ok

```

For a failing test:

```
test: "Tests\\ExampleTest::test_it_fails"
status: failed
file: "tests/ExampleTest.php"
line: 16
message: "Failed asserting that false is true."
description: "Failed asserting that false is true."
stackTrace: "..."

```

Testing
-------

[](#testing)

```
composer test
```

Changelog
---------

[](#changelog)

Please see [CHANGELOG](CHANGELOG.md) for more information on what has changed recently.

Credits
-------

[](#credits)

- [Peter Fox](https://github.com/peterfox)

License
-------

[](#license)

The MIT License (MIT). Please see [License File](LICENSE.md) for more information.

###  Health Score

45

—

FairBetter than 91% of packages

Maintenance86

Actively maintained with recent releases

Popularity17

Limited adoption so far

Community11

Small or concentrated contributor base

Maturity57

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 89.3% 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 ~47 days

Total

3

Last Release

69d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/15fcbffff7260a7e75c3f8600eb112b9447aaa5926965ba5376881ef50b9ab8b?d=identicon)[peterfox](/maintainers/peterfox)

---

Top Contributors

[![peterfox](https://avatars.githubusercontent.com/u/1716506?v=4)](https://github.com/peterfox "peterfox (25 commits)")[![dependabot[bot]](https://avatars.githubusercontent.com/in/29110?v=4)](https://github.com/dependabot[bot] "dependabot[bot] (2 commits)")[![HelgeSverre](https://avatars.githubusercontent.com/u/1089652?v=4)](https://github.com/HelgeSverre "HelgeSverre (1 commits)")

---

Tags

Peter Foxphpunit-toon-result-printer

###  Code Quality

Static AnalysisPHPStan

Code StylePHP CS Fixer

Type Coverage Yes

### Embed Badge

![Health badge](/badges/peterfox-phpunit-toon-result-printer/health.svg)

```
[![Health](https://phpackages.com/badges/peterfox-phpunit-toon-result-printer/health.svg)](https://phpackages.com/packages/peterfox-phpunit-toon-result-printer)
```

###  Alternatives

[brianium/paratest

Parallel testing for PHP

2.5k136.1M986](/packages/brianium-paratest)[drupal/core-dev

require-dev dependencies from drupal/drupal; use in addition to drupal/core-recommended to run tests from drupal/core.

2022.6M344](/packages/drupal-core-dev)[webmozarts/strict-phpunit

Enables type-safe comparisons of objects in PHPUnit

30314.4k7](/packages/webmozarts-strict-phpunit)

PHPackages © 2026

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