lean-book-tools/phpunit-cleaner-result-printer

PHPUnit result printer for books - simple and short

v0.3.9 2024-01-31 10:33 UTC

This package is auto-updated.

Last update: 2024-10-30 01:42:54 UTC


README

Install

composer require --dev leanbooktools/cleaner-result-printer

Usage

Register extension in your phpunit.xml file:

<extensions>
    <bootstrap class="LeanBookTools\CleanerResultPrinterExtension" />
</extensions>

Adding test cases to the end-to-end tests

  • Add a test that demonstrates your case, e.g. a risky test in fixture/DemoProject/tests.
  • Add a file with the expected output (see the folder for examples).
  • Run the tests: vendor/bin/phpunit.
  • To find out what normal PHPUnit output looks like, run bin/phpunit-reference-tests. This runs the same tests, but uses the built-in result printer.