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