lean-book-tools / phpunit-cleaner-result-printer
PHPUnit result printer for books - simple and short
Installs: 5 096
Dependents: 0
Suggesters: 0
Security: 0
Stars: 3
Watchers: 0
Forks: 1
Open Issues: 0
Requires
- php: ^8.2
- phpunit/phpunit: ^10.5
Requires (Dev)
- rector/rector: ^0.19.2
- symfony/finder: ^7.0
- symfony/process: ^7.0
- symplify/easy-coding-standard: ^12.1
- tracy/tracy: ^2.10
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.