Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/diablomedia/phpunit-pretty-printer
A PHPUnit result printer that shows per-file test progress and execution times
https://github.com/diablomedia/phpunit-pretty-printer
phpunit
Last synced: 3 days ago
JSON representation
A PHPUnit result printer that shows per-file test progress and execution times
- Host: GitHub
- URL: https://github.com/diablomedia/phpunit-pretty-printer
- Owner: diablomedia
- License: mit
- Created: 2016-02-16T17:43:13.000Z (almost 9 years ago)
- Default Branch: master
- Last Pushed: 2023-12-13T20:33:17.000Z (about 1 year ago)
- Last Synced: 2025-01-28T17:11:51.859Z (11 days ago)
- Topics: phpunit
- Language: PHP
- Size: 96.7 KB
- Stars: 78
- Watchers: 7
- Forks: 13
- Open Issues: 5
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# phpunit-pretty-printer
[![Build](https://github.com/diablomedia/phpunit-pretty-printer/workflows/Build/badge.svg?event=push)](https://github.com/diablomedia/phpunit-pretty-printer/actions?query=workflow%3ABuild+event%3Apush)
[![Latest Stable Version](https://poser.pugx.org/diablomedia/phpunit-pretty-printer/v/stable)](https://packagist.org/packages/diablomedia/phpunit-pretty-printer)
[![Total Downloads](https://poser.pugx.org/diablomedia/phpunit-pretty-printer/downloads)](https://packagist.org/packages/diablomedia/phpunit-pretty-printer)
[![License](https://poser.pugx.org/diablomedia/phpunit-pretty-printer/license)](https://packagist.org/packages/diablomedia/phpunit-pretty-printer)A PHPUnit result printer that shows per-file test progress and execution times.
## Installation
```bash
composer.phar require --dev diablomedia/phpunit-pretty-printer
```## Usage
**It's suggested to use the phpunit installed by composer.**
You can specify the printer to use on the phpunit command line:
```bash
php vendor/bin/phpunit --printer 'DiabloMedia\PHPUnit\Printer\PrettyPrinter' tests/
```To see per-test execution times, use the `--debug` flag:
```bash
php vendor/bin/phpunit --printer 'DiabloMedia\PHPUnit\Printer\PrettyPrinter' --debug tests/
```Optionally, you can add it to your project's `phpunit.xml` file instead:
```xml
```
## Screenshots
Default output:
![phpunit-pretty-printer](https://cloud.githubusercontent.com/assets/1278449/13678034/d76eda8a-e6a9-11e5-8c6b-04b6ec9976eb.png 'Default output')
Debug output showing time to run:
![phpunit-pretty-printer-debug](https://cloud.githubusercontent.com/assets/1278449/13678037/e0a09986-e6a9-11e5-891a-08c7b6389fca.png 'Debug output showing time to run')
## Acknowledgements
Inspiration for the default output was taken from https://github.com/adm-husker/kujira-phpunit-printer.