jeroenvanderlaan / phpunit-cli-setup
A PHPUnit extension for preparing test suite execution using CLI commands
Installs: 0
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 1
Forks: 0
Open Issues: 0
pkg:composer/jeroenvanderlaan/phpunit-cli-setup
Requires
- php: >=8.0
Requires (Dev)
- phpunit/phpunit: ^9.5
This package is auto-updated.
Last update: 2025-09-29 02:29:30 UTC
README
A PHPUnit extension for preparing test suite execution using CLI commands.
This package is a work in progess.
Install
composer require --dev jeroenvanderlaan/phpunit-cli-setup
Currently only PHP 8 and PHPUnit 9.5 are supported.
Usage
Add the CliSetupExtension
to your phpunit.xml
<extension>
configuration and have it execute CLI commands before running your test suite(s).
<phpunit> <extensions> <extension class="Jeroenvanderlaan\PhpUnitCliSetup\Extension\CliSetupExtension"> <arguments> <string>bin/my-command</string> </arguments> </extension> </extensions> </phpunit>
This will execute bin/my-command
before running your test suite(s).
Optionally, you can limit the execution of CLI commands to specific test suites only.
<phpunit> <extensions> <extension class="Jeroenvanderlaan\PhpUnitCliSetup\Extension\CliSetupExtension"> <arguments> <string>bin/my-command</string> <array> <element key="0"> <string>my-test-suite</string> </element> </array> </arguments> </extension> </extensions> </phpunit>
This will execute bin/my-command
only when running the test suite my-test-suite
.