项目作者: diablomedia

项目描述 :
A PHPUnit result printer that shows per-file test progress and execution times
高级语言: PHP
项目地址: git://github.com/diablomedia/phpunit-pretty-printer.git
创建时间: 2016-02-16T17:43:13Z
项目社区:https://github.com/diablomedia/phpunit-pretty-printer

开源协议:MIT License

下载


phpunit-pretty-printer

Build
Latest Stable Version
Total Downloads
License

A PHPUnit result printer that shows per-file test progress and execution times.

Installation

  1. 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:

  1. php vendor/bin/phpunit --printer 'DiabloMedia\PHPUnit\Printer\PrettyPrinter' tests/

To see per-test execution times, use the --debug flag:

  1. php vendor/bin/phpunit --printer 'DiabloMedia\PHPUnit\Printer\PrettyPrinter' --debug tests/

Optionally, you can add it to your project’s phpunit.xml file instead:

  1. <phpunit bootstrap="bootstrap.php" colors="true" printerClass="DiabloMedia\PHPUnit\Printer\PrettyPrinter">

Screenshots

Default output:

phpunit-pretty-printer

Debug output showing time to run:

phpunit-pretty-printer-debug

Acknowledgements

Inspiration for the default output was taken from https://github.com/adm-husker/kujira-phpunit-printer.