Skip to content

kefzceltd/phpunit-pretty-result-printer

 
 

Repository files navigation

CD PHPUnit Pretty Result Printer

Extend the default PHPUnit Result Printer with a modern, pretty printer!

PHPUnit Pretty Result Printer -- Packagist

Installation

Installation is provided via composer and can be done with the following command, the current version requires PHP 7.1 or greater:

composer require --dev codedungeon/phpunit-result-printer

Laravel 5.3 with PHP version 7.0.x:

If you are using PHP 7.0.x, you will need to use a compatible version of PHPUnit Result Printer (version 0.8.x)

composer require --dev codedungeon/phpunit-result-printer:^0.8

Usage

To activate the Printer for PHPUnit, just add it to your configuration XML:

<?xml version="1.0" encoding="UTF-8"?>
  <phpunit printerClass="Codedungeon\PHPUnitPrettyResultPrinter\Printer">
    // ....
  </phpunit>

Or from Command-Line:

phpunit --printer=Codedungeon\\PHPUnitPrettyResultPrinter\\Printer

Customizing Markers

You can customize the markers which are used for success, fail, error, skipped, incomplete by modifying the phpunit-printer.yml file.

  • Create a phpunit-printer.yml file in your application root to override default

The following are the default markers used (from the package phpunit-printer.yml file)

markers:
  cd-pass: "✓"
  cd-fail: "✖"
  cd-error: "⚈"
  cd-skipped: "→"
  cd-incomplete: "∅"

License

Copyright © 2017-2018 Mike Erickson Released under the MIT license

Credits

phpunit-result-printer written by Mike Erickson

E-Mail: codedungeon@gmail.com

Twitter: @codedungeon

Website: https://github.com/mikeerickson

Screenshot

Screenshot

About

PHPUnit Pretty Result Printer

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • PHP 100.0%